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

Unified Diff: breakpad.py

Issue 8051027: Fix importing breakpad from an interactive python prompt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 3 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: breakpad.py
diff --git a/breakpad.py b/breakpad.py
index 45a5bad0864b6dacd25cd9b06cff06895d956f47..3d27eabc62650a41906e8fe6da15bee49aa67211 100644
--- a/breakpad.py
+++ b/breakpad.py
@@ -134,7 +134,7 @@ def Register():
# Skip unit tests and we don't want anything from non-googler.
-if (not 'test' in sys.modules['__main__'].__file__ and
+if (not 'test' in getattr(sys.modules['__main__'], '__file__', '') and
not 'NO_BREAKPAD' in os.environ and
(_HOST_NAME.endswith('.google.com') or
_HOST_NAME.endswith('.chromium.org'))):
« 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