]> git.phdru.name Git - xsetbg.git/blob - xsetbg_db.py
Fix permissions: make helper modules not-executable
[xsetbg.git] / xsetbg_db.py
1 """XSetBg database
2
3 """
4
5 __author__ = "Oleg Broytman <phd@phdru.name>"
6 __copyright__ = "Copyright (C) 2014 PhiloSoft Design"
7 __license__ = "GNU GPL"
8
9 __all__ = ['xsetbg_db']
10
11 import anydbm
12 import os
13 import shelve
14 from xsetbg_conf import xsetbg_conf
15
16 xsetbg_db_path = os.path.expanduser(xsetbg_conf.get('xsetbg', 'database'))
17
18 try:
19     xsetbg_db = shelve.open(xsetbg_db_path, 'r')
20 except anydbm.error:
21     xsetbg_db = None