Mercurial > libervia-backend
changeset 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 |
files | src/core/constants.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 <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):