Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9337592
D2467.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D2467.diff
View Options
diff --git a/swh/deposit/cli/client.py b/swh/deposit/cli/client.py
--- a/swh/deposit/cli/client.py
+++ b/swh/deposit/cli/client.py
@@ -5,6 +5,7 @@
import os
import logging
+import sys
import tempfile
import uuid
@@ -335,12 +336,8 @@
metadata_deposit, collection, slug, partial, deposit_id,
replace, url, name, author)
except InputError as e:
- msg = 'Problem during parsing options: %s' % e
- r = {
- 'error': msg,
- }
- logger.info(r)
- return 1
+ logger.error('Problem during parsing options: %s', e)
+ sys.exit(1)
try:
if verbose:
@@ -382,12 +379,8 @@
client = _client(url, username, password)
collection = _collection(client)
except InputError as e:
- msg = 'Problem during parsing options: %s' % e
- r = {
- 'error': msg,
- }
- logger.info(r)
- return 1
+ logger.error('Problem during parsing options: %s', e)
+ sys.exit(1)
r = client.deposit_status(
collection=collection, deposit_id=deposit_id)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 3 2025, 8:10 AM (10 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217063
Attached To
D2467: Fix log level + status code of the client CLI in case of error.
Event Timeline
Log In to Comment