Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-deposit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine R. Dumont
swh-deposit
Commits
8a5696fb
Verified
Commit
8a5696fb
authored
5 years ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
cli.client: Let click check for filepath existence
parent
a4c3f018
No related branches found
Branches containing commit
Tags
v0.0.70
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swh/deposit/cli/client.py
+2
-9
2 additions, 9 deletions
swh/deposit/cli/client.py
with
2 additions
and
9 deletions
swh/deposit/cli/client.py
+
2
−
9
View file @
8a5696fb
...
...
@@ -178,9 +178,6 @@ def client_command_parse_input(
archive_deposit
=
False
metadata_deposit
=
False
if
archive
and
not
os
.
path
.
exists
(
archive
):
raise
InputError
(
'
Software Archive %s must exist!
'
%
archive
)
if
not
slug
:
# generate one as this is mandatory
slug
=
generate_slug
()
...
...
@@ -199,10 +196,6 @@ def client_command_parse_input(
"
Metadata deposit must be provided for metadata
"
"
deposit (either a filepath or --name and --author)
"
)
if
metadata
and
not
os
.
path
.
exists
(
metadata
):
raise
InputError
(
'
Software Archive metadata %s must exist!
'
%
(
metadata
,
))
if
not
archive
and
not
metadata
:
raise
InputError
(
'
Please provide an actionable command. See --help for more
'
...
...
@@ -274,9 +267,9 @@ def deposit_update(config, logger):
help
=
"
(Mandatory) User
'
s name
"
)
@click.option
(
'
--password
'
,
required
=
1
,
help
=
"
(Mandatory) User
'
s associated password
"
)
@click.option
(
'
--archive
'
,
@click.option
(
'
--archive
'
,
type
=
click
.
Path
(
exists
=
True
),
help
=
'
(Optional) Software archive to deposit
'
)
@click.option
(
'
--metadata
'
,
@click.option
(
'
--metadata
'
,
type
=
click
.
Path
(
exists
=
True
),
help
=
"
(Optional) Path to xml metadata file. If not provided, this will use a file named <archive>.metadata.xml
"
)
# noqa
@click.option
(
'
--archive-deposit/--no-archive-deposit
'
,
default
=
False
,
help
=
'
(Optional) Software archive only deposit
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment