mailr27968 - /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:03:
Author: bugman
Date: Fri Oct  2 17:03:27 2015
New Revision: 27968

URL: http://svn.gna.org/viewcvs/relax?rev=27968&view=rev
Log:
Added error catching to the find_unused_imports.py developer script.


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=27968&r1=27967&r2=27968&view=diff
==============================================================================
--- trunk/devel_scripts/find_unused_imports.py  (original)
+++ trunk/devel_scripts/find_unused_imports.py  Fri Oct  2 17:03:27 2015
@@ -28,10 +28,19 @@
         cmd = 'pylint %s' % path
 
         # Execute.
+        print cmd
         pipe = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, 
close_fds=False)
 
         # Close the pipe.
         pipe.stdin.close()
+
+        # Check for errors.
+        err = False
+        for line in pipe.stderr.readlines():
+            sys.stdout.write(line)
+            err = True
+        if err:
+            sys.exit()
 
         # Only display the import information.
         title_flag = True




Related Messages


Powered by MHonArc, Updated Fri Oct 02 17:40:04 2015