Fixed an issue in the cleanup method of the install script. 6_1_x

Sun, 24 Jul 2016 15:57:47 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 24 Jul 2016 15:57:47 +0200
branch
6_1_x
changeset 5052
6803b3fcc4c9
parent 5043
a4044e648b75
child 5056
ba04754da6a4

Fixed an issue in the cleanup method of the install script.

install.py file | annotate | diff | comparison | revisions
--- a/install.py	Tue Jul 19 18:51:15 2016 +0200
+++ b/install.py	Sun Jul 24 15:57:47 2016 +0200
@@ -469,10 +469,11 @@
             if os.path.exists(os.path.join(dirName, sourceName + "c")):
                 os.remove(os.path.join(dirName, sourceName + "c"))
     
-    # step 2: delete the __pycache__ directory and all *.pyc files
+    # step 2: delete the __pycache__ directory and all remaining *.pyc files
     if os.path.exists(os.path.join(dirName, "__pycache__")):
         shutil.rmtree(os.path.join(dirName, "__pycache__"))
-    for name in [f for f in dirListing if fnmatch.fnmatch(f, "*.pyc")]:
+    for name in [f for f in os.listdir(dirName)
+                 if fnmatch.fnmatch(f, "*.pyc")]:
         os.remove(os.path.join(dirName, name))
     
     # step 3: descent into subdirectories and delete them if empty

eric ide

mercurial