Skip to content

Commit e1da1d0

Browse files
committed
improve parsing order
Signed-off-by: Zen <[email protected]>
1 parent 3445364 commit e1da1d0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/pycpio/writer/writer.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@ def __init__(self, cpio_entries: list, output_file: Path, structure=None, compre
1919

2020
self.structure = structure if structure is not None else HEADER_NEW
2121

22-
if compression.lower() == 'true' or compression is True:
22+
if compression is True:
2323
self.compression = True
24-
elif compression.lower() == 'false' or compression is False:
24+
elif compression is False:
2525
self.compression = False
2626
elif isinstance(compression, str):
2727
compression = compression.lower()
28+
if compression == 'true':
29+
self.compression = True
30+
elif compression == 'false':
31+
self.compression = False
2832
self.xz_crc = xz_crc
2933

3034
def __bytes__(self):

0 commit comments

Comments
 (0)