core (constants): better management of xdg import

This commit is contained in:
Goffi 2014-08-20 23:04:57 +02:00
commit 774edc48a6

View file

@ -17,9 +17,11 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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):