infocalypse

(djk)
2009-04-06: Easy pylint fixes.

Easy pylint fixes.

diff --git a/infocalypse/__init__.py b/infocalypse/__init__.py
--- a/infocalypse/__init__.py
+++ b/infocalypse/__init__.py
@@ -285,7 +285,8 @@ cmdtable = {
 
     "fn-reinsert": (infocalypse_reinsert,
                 [('', 'requesturi', '', 'request URI to re-insert data from'),
-                 ('', 'inserturi', '', 'insert URI (required to re-insert the top key)'), ]
+                 ('', 'inserturi', '',
+                  'insert URI (required to re-insert the top key)'), ]
                 + FCP_OPTS,
                 "[options]"),
 
diff --git a/infocalypse/infcmds.py b/infocalypse/infcmds.py
--- a/infocalypse/infcmds.py
+++ b/infocalypse/infcmds.py
@@ -481,9 +481,11 @@ def execute_reinsert(ui_, repo, params, 
         params['REQUEST_URI'] = request_uri
 
         if not params['INSERT_URI'] is None:
-            ui_.status("%sInsert URI:\n%s\n" % (is_redundant(params['INSERT_URI']),
+            ui_.status("%sInsert URI:\n%s\n" % (is_redundant(params[
+                'INSERT_URI']),
                                                 params['INSERT_URI']))
-        ui_.status("%sRequest URI:\n%s\n" % (is_redundant(params['REQUEST_URI']),
+        ui_.status("%sRequest URI:\n%s\n" % (is_redundant(params[
+            'REQUEST_URI']),
                                              params['REQUEST_URI']))
 
         update_sm.start_reinserting(params['REQUEST_URI'],
diff --git a/infocalypse/insertingbundles.py b/infocalypse/insertingbundles.py
--- a/infocalypse/insertingbundles.py
+++ b/infocalypse/insertingbundles.py
@@ -156,12 +156,12 @@ class InsertingBundles(RequestQueueState
             request = self.parent.ctx.make_edge_insert_request(edge, edge,
                                                            self.salting_cache)
             self.pending[edge] = request
-        except BundleException, err:
+        except BundleException:
             if self.parent.ctx.get('REINSERT', 0) > 0:
-                self.parent.ctx.ui_.warn("Couldn't create an identical bundle to "
-                                         + "re-insert.\n"
-                                         + "Maybe the repository was inserted with a "
-                                         + "different version of hg?\n")
+                self.parent.ctx.ui_.warn("Couldn't create an identical "
+                                         + "bundle to re-insert.\n"
+                                         + "Maybe the repository was inserted "
+                                         + "with a different version of hg?\n")
                 self.parent.transition(FAILING)
             else:
                 # Dunno what's going on.
@@ -210,9 +210,11 @@ class InsertingBundles(RequestQueueState
                 if chk1 != graph.get_chk(edge):
                     self.parent.ctx.ui_.status("Bad CHK: %s %s\n" %
                                                (str(edge), chk1))
-                    self.parent.ctx.ui_.warn("CHK for reinserted edge doesn't match!\n"
-                                             + "Maybe the repository was inserted with a "
-                                             + "different version of hg?\n")
+                    self.parent.ctx.ui_.warn("CHK for reinserted edge doesn't "
+                                             + "match!\n"
+                                             + "Maybe the repository was "
+                                             + "inserted with a different "
+                                             + "version of hg?\n")
                     self.parent.transition(FAILING)
 
         else:
diff --git a/infocalypse/updatesm.py b/infocalypse/updatesm.py
--- a/infocalypse/updatesm.py
+++ b/infocalypse/updatesm.py
@@ -971,14 +971,17 @@ class UpdateStateMachine(RequestQueue, S
         self.transition(INVERTING_URI)
 
     def start_reinserting(self, request_uri, insert_uri=None, is_keypair=False):
-        """ """
+        """ Start reinserting the repository"""
         self.require_state(QUIESCENT)
         self.reset()
         self.ctx['REQUEST_URI'] = request_uri
         self.ctx['INSERT_URI'] = insert_uri
         self.ctx['IS_KEYPAIR'] = is_keypair
         self.ctx['REINSERT'] = 1
-        # REDFLAG: add hack code to InsertingUri to handle reinsert w/o insert uri?
+        # REDFLAG: added hack code to InsertingUri to handle
+        # reinsert w/o insert uri?
+        # Tradedoff: hacks in states vs. creating extra state
+        # instances just to be pedantic...
         self.transition(REQUESTING_URI_4_INSERT)
 
     # REDFLAG: UNTESTED