]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/compat.py
hashsplit: replace join_bytes with cat_bytes
[bup.git] / lib / bup / compat.py
index 985d8ac4bd61be75e7d244b3a8536ddc3a592336..859898d175425d0f363279098083f1e159a1c03e 100644 (file)
@@ -70,10 +70,6 @@ if py3:
             return memoryview(object)[offset:]
         return memoryview(object)
 
-    def join_bytes(*items):
-        """Return the concatenated bytes or memoryview arguments as bytes."""
-        return b''.join(items)
-
     def getcwd():
         return fsencode(os.getcwd())
 
@@ -148,17 +144,6 @@ else:  # Python 2
 
     buffer = buffer
 
-    def join_bytes(x, y):
-        """Return the concatenated bytes or buffer arguments as bytes."""
-        if type(x) == buffer:
-            assert type(y) in (bytes, buffer)
-            return x + y
-        assert type(x) == bytes
-        if type(y) == bytes:
-            return b''.join((x, y))
-        assert type(y) in (bytes, buffer)
-        return buffer(x) + y
-
 
 def restore_lc_env():
     # Once we're up and running with iso-8859-1, undo the bup-python