~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/crash.py

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:13:13 UTC
  • mfrom: (6614.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201191313-wdfvmfff1djde6oq
(vila) Release 2.7.0 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
 
18
17
"""Handling and reporting crashes.
19
18
 
20
19
A crash is an exception propagated up almost to the top level of Bazaar.
37
36
-Dno_apport.
38
37
"""
39
38
 
 
39
from __future__ import absolute_import
 
40
 
40
41
# for interactive testing, try the 'bzr assert-fail' command 
41
42
# or see http://code.launchpad.net/~mbp/bzr/bzr-fail
42
43
#
169
170
    pr['Platform'] = platform.platform(aliased=1)
170
171
    pr['UserEncoding'] = osutils.get_user_encoding()
171
172
    pr['FileSystemEncoding'] = sys.getfilesystemencoding()
172
 
    pr['Locale'] = os.environ.get('LANG')
 
173
    pr['Locale'] = os.environ.get('LANG', 'C')
173
174
    pr['BzrPlugins'] = _format_plugin_list()
174
175
    pr['PythonLoadedModules'] = _format_module_list()
175
176
    pr['BzrDebugFlags'] = pprint.pformat(debug.debug_flags)
258
259
        os.open(filename, 
259
260
            os.O_WRONLY|os.O_CREAT|os.O_EXCL,
260
261
            0600),
261
 
        'w')
 
262
        'wb')
262
263
 
263
264
 
264
265
def _format_plugin_list():