mailr27972 - /trunk/devel_scripts/find_unused_imports.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 02, 2015 - 17:53:
Author: bugman
Date: Fri Oct  2 17:53:55 2015
New Revision: 27972

URL: http://svn.gna.org/viewcvs/relax?rev=27972&view=rev
Log:
Fix for the find_unused_imports.py script.

The STDOUT lines need to be read before STDERR to avoid the script from 
freezing.


Modified:
    trunk/devel_scripts/find_unused_imports.py

Modified: trunk/devel_scripts/find_unused_imports.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/devel_scripts/find_unused_imports.py?rev=27972&r1=27971&r2=27972&view=diff
==============================================================================
--- trunk/devel_scripts/find_unused_imports.py  (original)
+++ trunk/devel_scripts/find_unused_imports.py  Fri Oct  2 17:53:55 2015
@@ -33,14 +33,6 @@
         # Close the pipe.
         pipe.stdin.close()
 
-        # Check for errors.
-        err = False
-        for line in pipe.stderr.readlines():
-            if search("command not found", line):
-                err = True
-        if err:
-            sys.exit()
-
         # Only display the import information.
         title_flag = True
         for line in pipe.stdout.readlines():
@@ -52,3 +44,11 @@
 
                 # Then the unused import line.
                 sys.stdout.write("    %s\n" % line[:-1])
+
+        # Check for errors.
+        err = False
+        for line in pipe.stderr.readlines():
+            if search("command not found", line):
+                err = True
+        if err:
+            sys.exit()




Related Messages


Powered by MHonArc, Updated Fri Oct 02 18:20:09 2015