core (constants): better management of xdg import
This commit is contained in:
parent
2af42b30c7
commit
774edc48a6
1 changed files with 4 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue