X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;ds=inline;f=xsetbg_db.py;h=54bc62e3d06f73875de6c1548bd5d2529d4f1aa0;hb=422a3f4810cf1eda80e4d4af1430809823ca3117;hp=d98e1b5a3ce0cc71fbd5f9eb1ec80b2abb64d0b3;hpb=76c9a423c497a1b7c2831087e02e6d8dbda5cb58;p=xsetbg.git diff --git a/xsetbg_db.py b/xsetbg_db.py old mode 100755 new mode 100644 index d98e1b5..54bc62e --- a/xsetbg_db.py +++ b/xsetbg_db.py @@ -1,4 +1,3 @@ -#! /usr/bin/env python """XSetBg database """ @@ -7,13 +6,14 @@ __author__ = "Oleg Broytman " __copyright__ = "Copyright (C) 2014 PhiloSoft Design" __license__ = "GNU GPL" -__all__ = ['xsetbg_db'] +__all__ = ['xsetbg_db_path', 'xsetbg_db'] import anydbm +import os import shelve from xsetbg_conf import xsetbg_conf -xsetbg_db_path = xsetbg_conf.get('xsetbg', 'database') +xsetbg_db_path = os.path.expanduser(xsetbg_conf.get('xsetbg', 'database')) try: xsetbg_db = shelve.open(xsetbg_db_path, 'r')