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)