Page MenuHomeSoftware Heritage

D2467.diff
No OneTemporary

D2467.diff

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

Mime Type
text/plain
Expires
Jul 3 2025, 8:10 AM (10 w, 22 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217063

Event Timeline