[gobject-introspection] Fix some PEP8 errors from previous commits



commit 5bc75e64e76dc0ab96edfd3b22a8af2b8a671920
Author: Colin Walters <walters verbum org>
Date:   Sat Feb 22 18:41:19 2014 -0500

    Fix some PEP8 errors from previous commits

 giscanner/dumper.py |    5 +++--
 giscanner/utils.py  |    5 ++++-
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index ea3fe68..85e8a2a 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -302,11 +302,12 @@ class DumpCompiler(object):
             # runs the command we want
             tf, tf_name = tempfile.mkstemp()
             f = os.fdopen(tf, 'wb')
-            fcontents = '#!/bin/sh\nunset PWD\n{}\n'.format(' '.join ([x.replace ('\\','/') for x in args]))
+            shellcontents = ' '.join([x.replace('\\', '/') for x in args])
+            fcontents = '#!/bin/sh\nunset PWD\n{}\n'.format(shellcontents)
             f.write(fcontents)
             f.close()
             shell = utils.which(shell)
-            args = [shell, tf_name.replace('\\','/')]
+            args = [shell, tf_name.replace('\\', '/')]
         try:
             subprocess.check_call(args)
         except subprocess.CalledProcessError as e:
diff --git a/giscanner/utils.py b/giscanner/utils.py
index b1fdcb4..537109c 100644
--- a/giscanner/utils.py
+++ b/giscanner/utils.py
@@ -183,12 +183,15 @@ def cflag_real_include_path(cflag):
 
     return "-I" + os.path.realpath(cflag[2:])
 
+
 def which(program):
     def is_exe(fpath):
         return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
 
     def is_nt_exe(fpath):
-        return not fpath.lower().endswith('.exe') and os.path.isfile(fpath + '.exe') and os.access(fpath + 
'.exe', os.X_OK)
+        return not fpath.lower().endswith('.exe') and \
+            os.path.isfile(fpath + '.exe') and \
+            os.access(fpath + '.exe', os.X_OK)
 
     fpath, fname = os.path.split(program)
     if fpath:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]