Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Unified Diff: chromite

Issue 6487003: Update to chromite wrapper to properly report import errors.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromite
===================================================================
--- chromite (revision 74447)
+++ chromite (working copy)
@@ -55,6 +55,16 @@
import chromite.shell.main
break
except ImportError, e:
+ # Just in case there is actually something wrong with Chromite, print
+ # a sensible error. We match only the end of the string so that we can
+ # handle an error within the chromite directory.
+ # The full error is 'No module named (chromite.)shell.main'
+ # Note: If you hit the directory containing chromite on the way up, then
+ # the error will be 'No module named shell.main' so we must check only the
+ # shell.main part.
+ if not str(e).endswith('shell.main'):
+ raise
+
# We've got different modules named chromite in the tree, pulling in the
# wrong one will break the right one. So unload it.
if 'chromite' in sys.modules:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698