Sandro Bonazzola has uploaded a new change for review.

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

cleanup: pep8 compliant

(cherry picked from commit dd8bb93b7d7217825b5821655eb5e5deeec48b64)

Change-Id: Ic1c47d19ba75c7b681c132d6a5738448d9a5d5b8
Signed-off-by: Sandro Bonazzola <[email protected]>
---
M src/__main__.py
1 file changed, 29 insertions(+), 21 deletions(-)


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

diff --git a/src/__main__.py b/src/__main__.py
index 796f425..cc35457 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"
@@ -863,7 +868,7 @@
         # We need to create the full path to the images directory
         if conf.get('ssh_user'):
             for filename in self.configuration.files:
-                logging.info( _("Start uploading %s "), filename )
+                logging.info(_("Start uploading %s "), filename)
                 try:
                     logging.debug('file (%s)' % filename)
                     dest_dir = os.path.join(path, remote_path)
@@ -933,7 +938,9 @@
                             # Force oVirt Engine to refresh the list of files
                             # in the ISO domain
                             self.refresh_iso_domain(id)
-                            logging.info(_("%s uploaded successfully"), 
filename)
+                            logging.info(
+                                _("%s uploaded successfully"), filename
+                            )
                         else:
                             logging.error(
                                 _(
@@ -956,19 +963,19 @@
                             address
                         )
                 except Exception, e:
-                        ExitCodes.exit_code = ExitCodes.UPLOAD_ERR
-                        logging.error(
-                            _(
-                                'Unable to copy %s to ISO storage '
-                                'domain on %s.'
-                            ),
-                            filename,
-                            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.'
+                        ),
+                        filename,
+                        self.configuration.get('iso_domain')
+                    )
+                    logging.error(
+                        _('Error message is "%s"'),
+                        str(e).strip()
+                    )
         else:
             # NFS support.
             tmpDir = tempfile.mkdtemp()
@@ -978,7 +985,7 @@
                 self.caller.call(cmd)
                 getpwnam(NFS_USER)
                 for filename in self.configuration.files:
-                    logging.info( _("Start uploading %s "), filename )
+                    logging.info(_("Start uploading %s "), filename)
                     dest_dir = os.path.join(
                         tmpDir,
                         remote_path
@@ -1181,7 +1188,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/13502
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: ovirt-iso-uploader-3.2
Gerrit-Owner: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to