[gnome-music] Check that Query.music_folder and Query.download_folder are not empty
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] Check that Query.music_folder and Query.download_folder are not empty
- Date: Mon, 24 Aug 2015 15:21:50 +0000 (UTC)
commit 9a2fd5aa1dab9c4ef8e1f9e7d70bc04ff9f5ef15
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Mon Aug 24 17:20:44 2015 +0200
Check that Query.music_folder and Query.download_folder are not empty
https://bugzilla.gnome.org/show_bug.cgi?id=753258
INSTALL | 4 ++--
gnomemusic/query.py | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/INSTALL b/INSTALL
index 007e939..2099840 100644
--- a/INSTALL
+++ b/INSTALL
@@ -12,8 +12,8 @@ without warranty of any kind.
Basic Installation
==================
- Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package. The following
+ Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
diff --git a/gnomemusic/query.py b/gnomemusic/query.py
index b4fa8aa..b9ab38e 100644
--- a/gnomemusic/query.py
+++ b/gnomemusic/query.py
@@ -48,13 +48,15 @@ class Query():
def __init__(self):
try:
Query.music_folder = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_MUSIC)
- except TypeError:
+ assert Query.music_folder is not None
+ except (TypeError, AssertionError):
logger.warn("XDG Music dir is not set")
return
try:
Query.download_folder = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DOWNLOAD)
- except TypeError:
+ assert Query.download_folder is not None
+ except (TypeError, AssertionError):
logger.warn("XDG Download dir is not set")
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]