mirror of
https://github.com/openSUSE/osc.git
synced 2024-09-21 01:36:16 +02:00
Fix a traceback when failed to unlock a keyring
This commit is contained in:
parent
0ea0015ca1
commit
1a6fa63ac9
@ -36,6 +36,14 @@ except:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
from keyring.errors import KeyringLocked
|
||||||
|
except ImportError:
|
||||||
|
# python-keyring is not installed
|
||||||
|
class KeyringLocked:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
# the good things are stolen from Matt Mackall's mercurial
|
# the good things are stolen from Matt Mackall's mercurial
|
||||||
|
|
||||||
|
|
||||||
@ -178,6 +186,8 @@ def run(prg, argv=None):
|
|||||||
print(f'{e.fname}:', e.msg, file=sys.stderr)
|
print(f'{e.fname}:', e.msg, file=sys.stderr)
|
||||||
except RPMError as e:
|
except RPMError as e:
|
||||||
print(e, file=sys.stderr)
|
print(e, file=sys.stderr)
|
||||||
|
except KeyringLocked as e:
|
||||||
|
print(e, file=sys.stderr)
|
||||||
except CertVerificationError as e:
|
except CertVerificationError as e:
|
||||||
print(e, file=sys.stderr)
|
print(e, file=sys.stderr)
|
||||||
except urllib3.exceptions.MaxRetryError as e:
|
except urllib3.exceptions.MaxRetryError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user