remove CoC

This commit is contained in:
Alexey Avramov 2019-01-22 23:52:52 +09:00
parent c205256c50
commit 4b67b2f131
3 changed files with 5 additions and 18 deletions

View File

@ -1,7 +0,0 @@
Go Fuck Yourself
=============
Offended? Go away. We don't need people who are offended because of a stranger on the internet.
Not offended? You're welcome to contribute.
© Copyright 2015 WTFCoC Consortium Committee.

View File

@ -160,7 +160,7 @@ See also `man journalctl`.
## Contribution
Please create [issues](https://github.com/hakavlad/nohang/issues). Use cases, feature requests and any questions are welcome. See also [CoC](https://github.com/hakavlad/nohang/blob/master/CODE_OF_CONDUCT.md).
Please create [issues](https://github.com/hakavlad/nohang/issues). Use cases, feature requests and any questions are welcome.
## Changelog

View File

@ -94,24 +94,17 @@ def root_notify_env():
list_with_envs = root_notify_env()
print(list_with_envs)
# if somebody logged in with GUI
if len(list_with_envs) > 0:
# iterating over logged-in users
for i in list_with_envs:
username, display_env, dbus_env = i[0], i[1], i[2]
display_tuple = display_env.partition('=')
username, dbus_env = i[0], i[2]
dbus_tuple = dbus_env.partition('=')
display_key, display_value = display_tuple[0], display_tuple[2]
dbus_key, dbus_value = dbus_tuple[0], dbus_tuple[2]
with Popen(['sudo', '-u', username,
'notify-send', '--icon=dialog-warning',
argv[1], argv[2]
], env={
display_key: display_value,
dbus_key: dbus_value
}) as proc:
with Popen(['sudo', '-u', username, 'env', 'DBUS_SESSION_BUS_ADDRESS={}'.format(dbus_value), 'notify-send', '--icon=dialog-warning', argv[1], argv[2]]) as proc:
try:
proc.wait(timeout=wait_time)
except TimeoutExpired:
@ -119,3 +112,4 @@ if len(list_with_envs) > 0:
print('TimeoutExpired: notify' + username)
else:
print('Nobody logged-in with GUI. Nothing to do.')