Sandro Bonazzola has uploaded a new change for review.

Change subject: cleanup: pep8 compliant
......................................................................

cleanup: pep8 compliant

Change-Id: Ic1c47d19ba75c7b681c132d6a5738448d9a5d5b8
Signed-off-by: Sandro Bonazzola <sbona...@redhat.com>
---
M src/__main__.py
1 file changed, 24 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-iso-uploader 
refs/changes/14/12314/1

diff --git a/src/__main__.py b/src/__main__.py
index dc8e7c0..9f6daf8 100644
--- a/src/__main__.py
+++ b/src/__main__.py
@@ -103,6 +103,7 @@
     """
     Utility class for forking programs.
     """
+
     def __init__(self, configuration):
         self.configuration = configuration
 
@@ -112,7 +113,9 @@
         return shlex.split(_cmd)
 
     def call(self, cmds):
-        """Uses the configuration to fork a subprocess and run cmds"""
+        """
+        Uses the configuration to fork a subprocess and run cmds
+        """
         _cmds = self.prep(cmds)
         logging.debug("_cmds(%s)" % _cmds)
         proc = subprocess.Popen(
@@ -133,9 +136,11 @@
 
 
 class Configuration(dict):
-    """This class is a dictionary subclass that knows how to read and """
-    """handle our configuration. Resolution order is defaults -> """
-    """configuration file -> command line options."""
+    """
+    This class is a dictionary subclass that knows how to read and
+    handle our configuration. Resolution order is defaults ->
+    configuration file -> command line options.
+    """
 
     class SkipException(Exception):
         "This exception is raised when the user aborts a prompt"
@@ -954,19 +959,19 @@
                             address
                         )
                 except Exception, e:
-                        ExitCodes.exit_code = ExitCodes.UPLOAD_ERR
-                        logging.error(
-                            _(
-                                'Unable to copy %s to ISO storage '
-                                'domain on %s.'
-                            ),
-                            file,
-                            self.configuration.get('iso_domain')
-                        )
-                        logging.error(
-                            _('Error message is "%s"'),
-                            str(e).strip()
-                        )
+                    ExitCodes.exit_code = ExitCodes.UPLOAD_ERR
+                    logging.error(
+                        _(
+                            'Unable to copy %s to ISO storage '
+                            'domain on %s.'
+                        ),
+                        file,
+                        self.configuration.get('iso_domain')
+                    )
+                    logging.error(
+                        _('Error message is "%s"'),
+                        str(e).strip()
+                    )
         else:
             # NFS support.
             tmpDir = tempfile.mkdtemp()
@@ -1178,7 +1183,8 @@
         default=False
     )
 
-    parser.add_option("", "--nossl", dest="nossl",
+    parser.add_option(
+        "", "--nossl", dest="nossl",
         help="Do not use ssl to connect to the engine.",
         action="store_true",
         default=False


--
To view, visit http://gerrit.ovirt.org/12314
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1c47d19ba75c7b681c132d6a5738448d9a5d5b8
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-iso-uploader
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to