Passing test.

This commit is contained in:
Itamar Turner-Trauring 2021-05-27 11:40:59 -04:00
parent 741af0b0eb
commit d78e9d891d

View File

@ -362,11 +362,12 @@ class BackupOptions(FileStoreOptions):
line. The file is assumed to be in the argv encoding.""" line. The file is assumed to be in the argv encoding."""
abs_filepath = argv_to_abspath(filepath) abs_filepath = argv_to_abspath(filepath)
try: try:
exclude_file = open(abs_filepath) exclude_file = open(abs_filepath, "rb")
except Exception as e: except Exception as e:
raise BackupConfigurationError('Error opening exclude file %s. (Error: %s)' % ( raise BackupConfigurationError('Error opening exclude file %s. (Error: %s)' % (
quote_local_unicode_path(abs_filepath), e)) quote_local_unicode_path(abs_filepath), e))
try: try:
for line in exclude_file: for line in exclude_file:
self.opt_exclude(line) self.opt_exclude(line)
finally: finally: