init env vars in crash report

This commit is contained in:
Alexey Nabrodov 2015-10-01 14:11:35 +03:00
parent ab6390b44e
commit be332fe723
2 changed files with 10 additions and 0 deletions

View File

@ -409,6 +409,10 @@ def data(readonly=False):
"Whether to shrink the completion to be smaller than the "
"configured size if there are no scrollbars."),
('match-type',
SettingValue(typ.MatchType(), 'contain'),
"Completion matching type"),
readonly=readonly
)),

View File

@ -20,6 +20,7 @@
"""The dialog which gets shown when qutebrowser crashes."""
import re
import os
import sys
import html
import getpass
@ -234,6 +235,11 @@ class _CrashDialog(QDialog):
self._crash_info.append(("Config", conf.dump_userconfig()))
except Exception:
self._crash_info.append(("Config", traceback.format_exc()))
masks = ('DESKTOP_SESSION', 'DE', 'QT_.*', 'PYTHON.*', 'LC_.*', 'LANG')
for key, value in os.environ.items():
for m in masks:
if re.match(m, key) is not None:
self._crash_info.append((key, value))
def _set_crash_info(self):
"""Set/update the crash info."""