-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Since MirrorPath.from_s3_key() uses str.removesuffix(), it breaks when a non-str is passed. Checking for type would be nifty to save headaches.
Error when calling MirrorPath.from_s3_key(None)
File "C:\Users\Trevor\py-rogue-detection\ddb_tracking\grd_structure.py", line 122, in from_json
rogue_labels=MirrorPath.from_s3_key(json_dict["rogue_labels"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Trevor\miniconda3\envs\rogue-venv\Lib\site-packages\S3MP\mirror_path.py", line 50, in from_s3_key
s3_key = s3_key.removesuffix('/')
^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'removesuffix'
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working