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

Side by Side 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, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Breakpad for Python. 5 """Breakpad for Python.
6 6
7 Sends a notification when a process stops on an exception. 7 Sends a notification when a process stops on an exception.
8 8
9 It is only enabled when all these conditions are met: 9 It is only enabled when all these conditions are met:
10 1. hostname finishes with '.google.com' or 'chromium.org' 10 1. hostname finishes with '.google.com' or 'chromium.org'
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 def Register(): 127 def Register():
128 """Registers the callback at exit. Calling it multiple times is no-op.""" 128 """Registers the callback at exit. Calling it multiple times is no-op."""
129 global _REGISTERED 129 global _REGISTERED
130 if _REGISTERED: 130 if _REGISTERED:
131 return 131 return
132 _REGISTERED = True 132 _REGISTERED = True
133 atexit.register(CheckForException) 133 atexit.register(CheckForException)
134 134
135 135
136 # Skip unit tests and we don't want anything from non-googler. 136 # Skip unit tests and we don't want anything from non-googler.
137 if (not 'test' in sys.modules['__main__'].__file__ and 137 if (not 'test' in getattr(sys.modules['__main__'], '__file__', '') and
138 not 'NO_BREAKPAD' in os.environ and 138 not 'NO_BREAKPAD' in os.environ and
139 (_HOST_NAME.endswith('.google.com') or 139 (_HOST_NAME.endswith('.google.com') or
140 _HOST_NAME.endswith('.chromium.org'))): 140 _HOST_NAME.endswith('.chromium.org'))):
141 Register() 141 Register()
142 142
143 # Uncomment this line if you want to test it out. 143 # Uncomment this line if you want to test it out.
144 #Register() 144 #Register()
OLDNEW
« 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