Browse Source

Fix for Python2 compatibility

test_fixup
Vadim Lebedev 2 years ago
parent
commit
5307ed6b87
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libarchive/__init__.py

+ 1
- 1
libarchive/__init__.py View File

@@ -163,7 +163,7 @@ def is_archive(f, formats=(None,), filters=(None,)):

This function will return True if the file can be opened as an archive using the given
format(s)/filter(s).'''
need_close: bool = False
need_close = False
if isinstance(f, str):
f = open(f, 'rb')
need_close = True


Loading…
Cancel
Save