Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cli
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
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
funkwhale
cli
Commits
19c4b751
Commit
19c4b751
authored
6 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Plain Diff
Merge branch 'cryptfile_exception_handling' into 'master'
Cryptfile exception handling Closes
#3
See merge request
!2
parents
1c936f6b
d73f67cc
No related branches found
No related tags found
1 merge request
!2
Cryptfile exception handling
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
funkwhale_cli/cli.py
+6
-1
6 additions, 1 deletion
funkwhale_cli/cli.py
with
6 additions
and
1 deletion
funkwhale_cli/cli.py
+
6
−
1
View file @
19c4b751
...
@@ -95,7 +95,12 @@ def set_server(ctx, url, token):
...
@@ -95,7 +95,12 @@ def set_server(ctx, url, token):
parsed
=
urllib
.
parse
.
urlparse
(
url
)
parsed
=
urllib
.
parse
.
urlparse
(
url
)
ctx
.
obj
[
"
SERVER_NETLOC
"
]
=
parsed
.
netloc
ctx
.
obj
[
"
SERVER_NETLOC
"
]
=
parsed
.
netloc
ctx
.
obj
[
"
SERVER_PROTOCOL
"
]
=
parsed
.
scheme
ctx
.
obj
[
"
SERVER_PROTOCOL
"
]
=
parsed
.
scheme
try
:
token
=
token
or
keyring
.
get_password
(
url
,
"
_
"
)
token
=
token
or
keyring
.
get_password
(
url
,
"
_
"
)
except
ValueError
as
e
:
raise
click
.
ClickException
(
"
Error while retrieving password from keyring: {}. Your password may be incorrect.
"
.
format
(
e
.
args
[
0
]))
except
Exception
as
e
:
raise
click
.
ClickException
(
"
Error while retrieving password from keyring: {}
"
.
format
(
e
.
args
[
0
]))
ctx
.
obj
[
"
remote
"
]
=
api
.
get_api
(
ctx
.
obj
[
"
remote
"
]
=
api
.
get_api
(
domain
=
ctx
.
obj
[
"
SERVER_NETLOC
"
],
domain
=
ctx
.
obj
[
"
SERVER_NETLOC
"
],
protocol
=
ctx
.
obj
[
"
SERVER_PROTOCOL
"
],
protocol
=
ctx
.
obj
[
"
SERVER_PROTOCOL
"
],
...
...
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