Anonymous avatar Anonymous committed ba99e8a

Return an exit status != 0 on error.

Comments (0)

Files changed (1)

sphinx/__init__.py

             app.builder.build_specific(filenames)
         else:
             app.builder.build_update()
+    except KeyboardInterrupt:
+        # catches BaseExceptions in 2.5 -- SystemExit, KeyboardInterrupt
+        return 1
+    except SystemExit:
+        return 0
     except Exception, err:
         if use_pdb:
             import pdb
                                      'error, so that a better error message '
                                      'can be provided next time.')
                 print >>sys.stderr, 'Send reports to georg@python.org. Thanks!'
-    except:
-        # catches BaseExceptions in 2.5 -- SystemExit, KeyboardInterrupt
-        pass
+            return 1
 
 
 if __name__ == '__main__':
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.