瀏覽代碼

a2b_base64 now also accepts ascii-only str objects

Thomas Waldmann 9 年之前
父節點
當前提交
fc326df600
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      borg/key.py

+ 1 - 1
borg/key.py

@@ -263,7 +263,7 @@ class KeyfileKeyBase(AESKeyBase):
         raise NotImplementedError
 
     def _load(self, key_data, passphrase):
-        cdata = a2b_base64(key_data.encode('ascii'))  # .encode needed for Python 3.[0-2]
+        cdata = a2b_base64(key_data)
         data = self.decrypt_key_file(cdata, passphrase)
         if data:
             key = msgpack.unpackb(data)