We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92a7c6e commit 7610534Copy full SHA for 7610534
caltechdata_api/cli.py
@@ -417,10 +417,13 @@ def upload_supporting_file(record_id=None):
417
elif filename == "n":
418
break
419
elif (not len(filename) == 0) and (filename[len(filename) - 1] == '/'):
420
- files_name = files[int(filename[0])-1]
421
- filepath = os.path.abspath(files_name)
422
- filepaths.append(filepath)
423
- print("File added successfully")
+ try:
+ files_name = files[int(filename[0])-1]
+ filepath = os.path.abspath(files_name)
+ filepaths.append(filepath)
424
+ print("File added successfully")
425
+ except ValueError:
426
+ continue
427
elif filename in files:
428
file_size = os.path.getsize(filename)
429
if file_size > 1024 * 1024 * 1024:
0 commit comments