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() _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits