"""
-__author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2000-2015 PhiloSoft Design"
-__license__ = "GNU GPL"
-
-__all__ = ['change']
-
from fcntl import flock, LOCK_EX, LOCK_UN, LOCK_NB
from datetime import timedelta
import os
from xsetbg_conf import xsetbg_dir, xsetbg_conf
from xsetbg_db import xsetbg_db
+__all__ = ['change']
+
def error(error_str):
sys.exit("%s: Error: %s\n" % (sys.argv[0], error_str))
error("No unshown images found. Run rescan_fs.py "
"or decrease min_delay. Abort.")
+fs_encoding = xsetbg_conf.get("images", "fs_encoding")
def change(force=False):
# Use the program's file as the lock file:
program_options = ["xli", "-border", random.choice(borders),
"-center", "-onroot", "-quiet", "-zoom", "auto",
- row.full_name]
+ row.full_name.encode(fs_encoding)]
rc = subprocess.call(program_options)
if rc: