Skip to content

Commit

Permalink
on error at os.getlogin, assume 'SUDO' is being used.
Browse files Browse the repository at this point in the history
instead of the user being 'root'.
As it is more likely for a user to run openpyn at sudo.
  • Loading branch information
jotyGill committed Sep 25, 2017
1 parent a199224 commit 3dfbdc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openpyn/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ def running_with_sudo():
else:
return True # 'sudo' is used notification won't work.
except FileNotFoundError:
print("os.getlogin, returned error, assuming 'openpyn' is running without 'SUDO'")
print("os.getlogin, returned error, assuming 'openpyn' is running with 'SUDO'")
return True
return False # regular user without 'sudo'

0 comments on commit 3dfbdc4

Please sign in to comment.