1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-13 09:16:14 +01:00

Merge pull request #754 from adrianschroeter/hot_fix

dealing with new exception errors
This commit is contained in:
Marco Strigl 2022-03-31 10:59:50 +02:00 committed by GitHub
commit 64631f1d91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,18 +2,32 @@ import importlib
import bz2
import base64
import getpass
import sys
try:
from urllib.parse import urlsplit
except ImportError:
from urlparse import urlsplit
try:
import keyring
except ImportError:
keyring = None
except BaseException as e:
# catch and report any exceptions raised in the 'keyring' module
msg = "Warning: Unable to load the 'keyring' module due to an internal error:"
print(msg, e, file=sys.stderr)
keyring = None
try:
import gnomekeyring
except ImportError:
gnomekeyring = None
except BaseException as e:
# catch and report any exceptions raised in the 'gnomekeyring' module
msg = "Warning: Unable to load the 'gnomekeyring' module due to an internal error:"
print(msg, e, file=sys.stderr)
gnomekeyring = None
from . import conf
from . import oscerr