Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/cli/deposit.py
Show All 17 Lines | |||||
class InputError(ValueError): | class InputError(ValueError): | ||||
"""Input script error | """Input script error | ||||
""" | """ | ||||
pass | pass | ||||
def generate_slug(prefix='swh-sample'): | def generate_slug(): | ||||
"""Generate a slug (sample purposes). | """Generate a slug (sample purposes). | ||||
""" | """ | ||||
return '%s-%s' % (prefix, uuid.uuid4()) | return str(uuid.uuid4()) | ||||
def client_command_parse_input( | def client_command_parse_input( | ||||
username, password, archive, metadata, | username, password, archive, metadata, | ||||
archive_deposit, metadata_deposit, | archive_deposit, metadata_deposit, | ||||
collection, slug, partial, deposit_id, replace, | collection, slug, partial, deposit_id, replace, | ||||
url, status): | url, status): | ||||
"""Parse the client subcommand options and make sure the combination | """Parse the client subcommand options and make sure the combination | ||||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |