From 774edc48a6640f86eff4ad7027ad7f4a0c78eed1 Mon Sep 17 00:00:00 2001 From: Goffi Date: Wed, 20 Aug 2014 23:04:57 +0200 Subject: [PATCH] core (constants): better management of xdg import --- src/core/constants.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/constants.py b/src/core/constants.py index 3de1c407..0c6eadac 100644 --- a/src/core/constants.py +++ b/src/core/constants.py @@ -17,9 +17,11 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from xdg import BaseDirectory -if BaseDirectory is not None: +try: + from xdg import BaseDirectory from os.path import expanduser, realpath +except ImportError: + BaseDirectory = None class Const(object):