fix GUI warns

This commit is contained in:
Alexey Avramov 2019-01-11 18:48:55 +09:00
parent a5eea96d5d
commit fbe4f8ea01

16
nohang
View File

@ -176,9 +176,20 @@ def root_notify_env():
unsorted_envs_list.append(one_env)
env = set(unsorted_envs_list)
env.discard(None)
new_env = []
end = []
for i in env:
print(i)
return env
key = i[0] + i[1]
print(key)
if key not in end:
end.append(key)
new_env.append(i)
else:
continue
print(new_env)
return new_env
def string_to_float_convert_test(string):
@ -406,6 +417,9 @@ def send_notify(signal, name, pid):
if len(b) > 0:
for i in b:
username, display_env, dbus_env = i[0], i[1], i[2]
#if '1000' in dbus_env:
# continue
print(username, display_env, dbus_env)
try:
Popen(['sudo', '-u', username, 'env', display_env,
dbus_env, 'notify-send', '--icon=dialog-warning',