Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve messages for missing dependencies #406

Merged
merged 1 commit into from
Jul 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions plyer/platforms/linux/brightness.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class LinuxBrightness(Brightness):

def __init__(self):
if os.system("which xbacklight"):
raise Exception(
"It seems that 'xbacklight' is not installed. \
Install it using 'sudo apt-get install xbacklight'.")
msg = ("It looks like 'xbacklight' is not installed. Try "
"installing it with your distribution's package manager.")
raise Exception(msg)

def _current_level(self):
cr_level = subprocess.check_output(["xbacklight", "-get"])
Expand Down
5 changes: 4 additions & 1 deletion plyer/platforms/linux/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def instance():
import dbus
return NotifyDbus()
except ImportError:
msg = "python-dbus not installed. try: `sudo pip install python-dbus`."
msg = ("The Python dbus package is not installed.\n"
"Try installing it with your distribution's package manager, "
"it is usually called python-dbus or python3-dbus, but you "
"might have to try dbus-python instead, e.g. when using pip.")
warnings.warn(msg)
if whereis_exe('notify-send'):
return NotifySendNotification()
Expand Down