summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Waldmann <tw@waldmann-edv.de>2017-02-13 04:12:12 +0100
committerThomas Waldmann <tw@waldmann-edv.de>2017-02-13 04:12:12 +0100
commite5f712129685e02a6755fa53f1546a66e842b215 (patch)
tree02884d5f69c528b67a8ae3aa0371681b59148731
parentbb626034ee9b19bea673048b2c272271f9865fde (diff)
paperkey.html - decode as utf-8, fixes #21501.0.10
hardcoded the encoding for reading it. while utf-8 is the default encoding on many systems, it does not work everywhere. and when it tries to decode with the ascii decoder, it fails.
-rw-r--r--borg/testsuite/archiver.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/borg/testsuite/archiver.py b/borg/testsuite/archiver.py
index cdca480c5..fe05575c9 100644
--- a/borg/testsuite/archiver.py
+++ b/borg/testsuite/archiver.py
@@ -1280,7 +1280,7 @@ class ArchiverTestCase(ArchiverTestCaseBase):
repo_id = self._extract_repository_id(self.repository_path)
self.cmd('key', 'export', '--qr-html', self.repository_location, export_file)
- with open(export_file, 'r') as fd:
+ with open(export_file, 'r', encoding='utf-8') as fd:
export_contents = fd.read()
assert bin_to_hex(repo_id) in export_contents