xattr-helper.py: fix AssertionError string format
authorZac Medico <zmedico@gentoo.org>
Tue, 11 Dec 2012 17:14:41 +0000 (09:14 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 11 Dec 2012 17:14:41 +0000 (09:14 -0800)
bin/xattr-helper.py

index b832f5ea770ec7d372efc827a089eafdfa78696c..e63f2cbbd442a64c5211e786d315ee61c49eae59 100755 (executable)
@@ -113,13 +113,13 @@ def restore_xattrs(file_in):
                        parts = line.split(b'=', 1)
                        if len(parts) == 2:
                                if pathname is None:
-                                       raise AssertionError('line %d: missing pathname' % i + 1)
+                                       raise AssertionError('line %d: missing pathname' % (i + 1,))
                                attr = unquote(parts[0])
                                # strip trailing newline and quotes 
                                value = unquote(parts[1].rstrip(b'\n')[1:-1])
                                xattr.set(pathname, attr, value)
                        elif line.strip():
-                               raise AssertionError("line %d: malformed entry" % i + 1)
+                               raise AssertionError("line %d: malformed entry" % (i + 1,))
 
 def main(argv):