]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/io.py
Add "do nothing" path_msg to centralize path conversions
[bup.git] / lib / bup / io.py
index 6f4cca7e10aa1cff0bf47575d1bbfbe137956b48..571e9b9102d76fa43b42c7fb283d722b17b0f618 100644 (file)
@@ -10,3 +10,15 @@ if compat.py_maj > 2:
 else:
     def byte_stream(file):
         return file
+
+
+def path_msg(x):
+    """Return a string representation of a path.
+
+    For now, assume that the destination encoding is going to be
+    ISO-8859-1, which it should be, for the primary current
+    destination, stderr, given the current bup-python.
+
+    """
+    # FIXME: configurability (might git-config quotePath be involved?)
+    return x.decode(encoding='iso-8859-1')