-#! /usr/bin/env python
+#! /usr/bin/env python3
"""XSetBg database
"""
__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):
db_dirs = []
try:
xsetbg_db_path = xsetbg_conf.get('xsetbg', 'database')
-except:
+except Exception:
xsetbg_db_path = None
if not xsetbg_db_path:
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)