return int(float(s))
-dump_file = open(sys.argv[1], 'r')
+dump_file = open(sys.argv[1], 'r',
+ encoding=xsetbg_conf.get("images", "fs_encoding"))
xsetbg_db = recreate_db()
count_new = count_old = count_updated = 0
-fs_encoding = xsetbg_conf.get("images", "fs_encoding")
with SQLiteMassInsert() as txn:
for line in dump_file:
id, timestamp, filename = line.strip().split(None, 2)
id = convert_str(id)
timestamp = convert_str(timestamp)
- filename = filename.decode(fs_encoding)
try:
if id:
row = xsetbg_db.get(id)