From d4035539c63323d14fcdc5d243a6facff62ad4af Mon Sep 17 00:00:00 2001 From: benonymity Date: Sat, 10 Sep 2022 09:21:06 -0400 Subject: [PATCH] fix: errors with ints and ArchiveEntry --- opendrop/cli.py | 2 +- opendrop/util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opendrop/cli.py b/opendrop/cli.py index eaa58bb..dc95f20 100644 --- a/opendrop/cli.py +++ b/opendrop/cli.py @@ -219,7 +219,7 @@ def _get_receiver_info(self): except IndexError: pass # (2) try 'id' - if len(self.receiver) == 12: + if len(str(self.receiver)) == 12: for info in infos: if info["id"] == self.receiver: return info diff --git a/opendrop/util.py b/opendrop/util.py index 33ae021..944554a 100644 --- a/opendrop/util.py +++ b/opendrop/util.py @@ -181,7 +181,7 @@ def add_abs_file(self, path, store_path): block_size = 10240 # pragma: no cover with new_archive_entry() as entry_p: - entry = ArchiveEntry(None, entry_p) + entry = ArchiveEntry(entry_p) with new_archive_read_disk(path) as read_p: while True: r = read_next_header2(read_p, entry_p)