From c8652b301fb59eead1f76bf34215af5413ffa4aa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 1 Apr 2011 02:41:15 +0000 Subject: pep8 checker, mostly pedantic style changes but also found an error in mesh_utils.mesh_linked_faces() --- build_files/buildbot/master_unpack.py | 8 ++++---- build_files/buildbot/slave_pack.py | 16 ++++++++-------- build_files/cmake/cmake_qtcreator_project.py | 3 +-- build_files/cmake/example_scripts/make_quicky.py | 6 +++--- 4 files changed, 16 insertions(+), 17 deletions(-) (limited to 'build_files') diff --git a/build_files/buildbot/master_unpack.py b/build_files/buildbot/master_unpack.py index f97e53384b0..612b686b49a 100644 --- a/build_files/buildbot/master_unpack.py +++ b/build_files/buildbot/master_unpack.py @@ -94,11 +94,11 @@ if platform == '': sys.exit(1) # extract -dir = 'public_html/download' +directory = 'public_html/download' try: zf = z.open(package) - f = file(os.path.join(dir, packagename), "wb") + f = file(os.path.join(directory, packagename), "wb") shutil.copyfileobj(zf, f) @@ -112,10 +112,10 @@ except Exception, ex: # remove other files from the same platform try: - for f in os.listdir(dir): + for f in os.listdir(directory): if platform.lower() in f.lower(): if f != packagename: - os.remove(os.path.join(dir, f)) + os.remove(os.path.join(directory, f)) except Exception, ex: sys.stderr.write('Failed to remove old packages: %s\n' % str(ex)) sys.exit(1) diff --git a/build_files/buildbot/slave_pack.py b/build_files/buildbot/slave_pack.py index 74d00bf9249..effe7751915 100644 --- a/build_files/buildbot/slave_pack.py +++ b/build_files/buildbot/slave_pack.py @@ -41,12 +41,12 @@ if builder.find('scons') != -1: sys.exit(retcode) # clean release directory if it already exists -dir = 'release' +directory = 'release' -if os.path.exists(dir): - for f in os.listdir(dir): - if os.path.isfile(os.path.join(dir, f)): - os.remove(os.path.join(dir, f)) +if os.path.exists(directory): + for f in os.listdir(directory): + if os.path.isfile(os.path.join(directory, f)): + os.remove(os.path.join(directory, f)) # create release package try: @@ -56,7 +56,7 @@ except Exception, ex: sys.exit(1) # find release directory, must exist this time -if not os.path.exists(dir): +if not os.path.exists(directory): sys.stderr.write("Failed to find release directory.\n") sys.exit(1) @@ -64,8 +64,8 @@ if not os.path.exists(dir): file = None filepath = None -for f in os.listdir(dir): - rf = os.path.join(dir, f) +for f in os.listdir(directory): + rf = os.path.join(directory, f) if os.path.isfile(rf) and f.startswith('blender'): file = f filepath = rf diff --git a/build_files/cmake/cmake_qtcreator_project.py b/build_files/cmake/cmake_qtcreator_project.py index 1bad1835434..601cf865ab4 100644 --- a/build_files/cmake/cmake_qtcreator_project.py +++ b/build_files/cmake/cmake_qtcreator_project.py @@ -114,7 +114,6 @@ def cmake_advanced_info(): """ def create_eclipse_project(CMAKE_DIR): - import sys if sys.platform == "win32": cmd = 'cmake %r -G"Eclipse CDT4 - MinGW Makefiles"' % CMAKE_DIR else: @@ -125,7 +124,7 @@ def cmake_advanced_info(): includes = [] defines = [] - import os + create_eclipse_project(CMAKE_DIR) diff --git a/build_files/cmake/example_scripts/make_quicky.py b/build_files/cmake/example_scripts/make_quicky.py index d7c43f4b86e..a4e0d3371f1 100755 --- a/build_files/cmake/example_scripts/make_quicky.py +++ b/build_files/cmake/example_scripts/make_quicky.py @@ -43,8 +43,8 @@ def main(): targets = set() # collect targets - file = open("Makefile", "r") - for line in file: + makefile = open("Makefile", "r") + for line in makefile: line = line.rstrip() if not line or line[0] in ". \t@$#": continue @@ -59,7 +59,7 @@ def main(): continue targets.add(line) - file.close() + makefile.close() # remove cmake targets bad = set([ -- cgit v1.2.3