# HG changeset patch # User Goffi # Date 1408568697 -7200 # Node ID e51e69b7732daf6706ea28490141caac5054b5cc # Parent 9344e4542f26911aae103c27dcadbd3c11924aae core (constants): better management of xdg import diff -r 9344e4542f26 -r e51e69b7732d src/core/constants.py --- a/src/core/constants.py Wed Aug 20 22:59:33 2014 +0200 +++ b/src/core/constants.py Wed Aug 20 23:04:57 2014 +0200 @@ -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):