fix #563: split prog parts before formating in item's name

This commit is contained in:
Pedro Silva 2014-03-02 22:08:45 +01:00
parent dc4624c1b3
commit 6ef879ffec

View file

@ -52,7 +52,8 @@ def _checksum(item, prog):
output as flexattr on a key that is the name of the program, and output as flexattr on a key that is the name of the program, and
return the key, checksum tuple. return the key, checksum tuple.
""" """
args = shlex.split(prog.format(file=item.path)) args = [p.format(file=item.path) for p in shlex.split(prog)]
print args
key = args[0] key = args[0]
checksum = getattr(item, key, False) checksum = getattr(item, key, False)
if not checksum: if not checksum: