Mercurial > libervia-backend
comparison src/core/constants.py @ 1112:e51e69b7732d
core (constants): better management of xdg import
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 20 Aug 2014 23:04:57 +0200 |
parents | 9344e4542f26 |
children | edd3fc4b4aaf |
comparison
equal
deleted
inserted
replaced
1111:9344e4542f26 | 1112:e51e69b7732d |
---|---|
15 # GNU Affero General Public License for more details. | 15 # GNU Affero General Public License for more details. |
16 | 16 |
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 from xdg import BaseDirectory | 20 try: |
21 if BaseDirectory is not None: | 21 from xdg import BaseDirectory |
22 from os.path import expanduser, realpath | 22 from os.path import expanduser, realpath |
23 except ImportError: | |
24 BaseDirectory = None | |
23 | 25 |
24 | 26 |
25 class Const(object): | 27 class Const(object): |
26 | 28 |
27 ## Application ## | 29 ## Application ## |