pep8 fixes for buildbot
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 2 Apr 2011 05:53:42 +0000 (05:53 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 2 Apr 2011 05:53:42 +0000 (05:53 +0000)
build_files/buildbot/master_unpack.py
build_files/buildbot/slave_compile.py

index 612b686..06c11b3 100644 (file)
@@ -45,7 +45,9 @@ def get_platform(filename):
     filename = strip_extension(filename)
 
     tokens = filename.split("-")
-    platforms = 'osx', 'mac', 'bsd', 'win', 'linux', 'source', 'irix', 'solaris'
+    platforms = ('osx', 'mac', 'bsd',
+                 'win', 'linux', 'source',
+                 'irix', 'solaris')
     platform_tokens = []
     found = False
 
@@ -90,7 +92,8 @@ packagename = os.path.basename(package)
 platform = get_platform(packagename)
 
 if platform == '':
-    sys.stderr.write('Failed to detect platform from package: %r\n' % packagename)
+    sys.stderr.write('Failed to detect platform ' +
+        'from package: %r\n' % packagename)
     sys.exit(1)
 
 # extract
index ab9b9a6..e6dd484 100644 (file)
@@ -54,6 +54,7 @@ if builder.find('cmake') != -1:
 else:
     # scons
     os.chdir(blender_dir)
+    scons_cmd = ['python', 'scons/scons.py']
     scons_options = []
 
     if builder.startswith('linux'):
@@ -79,7 +80,7 @@ else:
             'BF_INSTALLDIR=' + install_dir]
 
         # Clean all directories first
-        retcode = subprocess.call(['python', 'scons/scons.py'] + common_options + ['clean'])
+        retcode = subprocess.call(scons_cmd + common_options + ['clean'])
         if retcode != 0:
             print('Error cleaning build directory')
             sys.exit(retcode)
@@ -111,7 +112,7 @@ else:
 
             scons_options.append('BF_CONFIG=' + config_fpath)
 
-            retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
+            retcode = subprocess.call(scons_cmd + scons_options)
             if retcode != 0:
                 print('Error building rules wuth config ' + config)
                 sys.exit(retcode)