Skip to content

Commit 6f94978

Browse files
committed
fix init for items with no data
Signed-off-by: Zen <[email protected]>
1 parent b94f57c commit 6f94978

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "pycpio"
7-
version = "0.8.4"
7+
version = "0.9.0"
88
authors = [
99
{ name="Desultory", email="[email protected]" },
1010
]

src/pycpio/cpio/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def __setattr__(self, name, value):
181181
def __init__(self, data: bytes, header, *args, **kwargs):
182182
self.header = header
183183
self.hash = None
184-
self.data = data
184+
self.data = data if data is not None else b''
185185

186186
def __str__(self):
187187
return f"\n{self.header}\nSHA256: {self.hash}\n{self.__class__.__name__}"

0 commit comments

Comments
 (0)