Fix bug when exclude pattern is None

This commit is contained in:
Fuxino committed 2023-05-31 19:07:50 +02:00
1 parent 0dd7b887f7
commit 06620a4dba
2 files changed
+5 -3

No files matched your search

+1
View File
@@ -1,2 +1,3 @@
.idea/
__pycache__/
test/
+4 -3
View File
@@ -185,9 +185,10 @@ class Backup:
fp.write('\n')
with open(self._exclude_path, 'w') as fp:
for e in self.exclude:
fp.write(e)
fp.write('\n')
if self.exclude is not None:
for e in self.exclude:
fp.write(e)
fp.write('\n')
if self.keep != -1 and self.remove_before:
self.remove_old_backups()