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'))): |