fix nhang_notify_helper crash
This commit is contained in:
parent
0e1bed33e7
commit
5f542d9272
@ -57,12 +57,21 @@ def re_pid_environ(pid):
|
|||||||
if i.startswith('HOME=/var'):
|
if i.startswith('HOME=/var'):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
# dirty hack; todo: fix alg
|
||||||
env = user.partition('USER=')[2], display, dbus
|
env = user.partition('USER=')[2], display, dbus
|
||||||
|
except UnboundLocalError:
|
||||||
|
print('notify helper: UnboundLocalError')
|
||||||
|
return None
|
||||||
|
|
||||||
return env
|
return env
|
||||||
|
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
print('notify helper: FileNotFoundError')
|
||||||
return None
|
return None
|
||||||
except ProcessLookupError:
|
except ProcessLookupError:
|
||||||
|
print('notify helper: ProcessLookupError')
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user