def is_image(full_path):
# Run `identify` from ImageMagic; convert retcode to bool
- return not subprocess.call(['identify', full_path],
+ return not subprocess.call(['identify', full_path.encode(fs_encoding)],
stdout=NULL, stderr=subprocess.STDOUT)
try:
row = xsetbg_db.byFull_name(full_name)
except SQLObjectNotFound:
- values = {'full_name': full_name.encode('utf-8'),
+ values = {'full_name': full_name,
'is_image': is_image(full_name),
'flag': True,
}