X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=xsetbg_db.py;h=85cecc289f2b440df531adc1ee86e227ef9bac7f;hb=080d6169f03836330b355e5304e51122d7956c11;hp=406ca9609809caf9c77714a2b66e3091f0af7425;hpb=bfa8949a6a7938586bdd4db9003d85ac0dea588a;p=xsetbg.git diff --git a/xsetbg_db.py b/xsetbg_db.py index 406ca96..85cecc2 100755 --- a/xsetbg_db.py +++ b/xsetbg_db.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 """XSetBg database """ @@ -11,7 +11,7 @@ from xsetbg_conf import xsetbg_conf __all__ = ['xsetbg_db_path', 'xsetbg_db'] # octal; -rw-------; make the database file(s) readable only by the user -os.umask(0066) +os.umask(0o066) class XSetBg(SQLObject): @@ -57,7 +57,7 @@ class SQLiteMassInsert(object): db_dirs = [] try: xsetbg_db_path = xsetbg_conf.get('xsetbg', 'database') -except: +except Exception: xsetbg_db_path = None if not xsetbg_db_path: @@ -88,5 +88,5 @@ else: xsetbg_db = None if __name__ == '__main__': - print "DB dirs:", db_dirs - print "DB file:", xsetbg_db_path + print("DB dirs:", db_dirs) + print("DB file:", xsetbg_db_path)