diff options
-rwxr-xr-x | dlpcvp.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -31,13 +31,14 @@ config = configparser.ConfigParser() config.read(ConfigRCs) logging.basicConfig(format='%(levelname)s:%(funcName)s:%(message)s', - stream=sys.stdout, level=logging.INFO) + level=logging.INFO) log = logging.getLogger() # or HTTPPasswordMgrWithPriorAuth ? -password_mgr = urllib.request.HTTPPasswordMgrWithDefaultRealm() +password_mgr = urllib.request.HTTPPasswordMgrWithPriorAuth() user = config[OBS_base]['user'] passw = config[OBS_base]['pass'] +log.debug("user = {}, password = {}".format(user, passw)) password_mgr.add_password(OBS_realm, OBS_base, user, passw) auth_handler = urllib.request.HTTPBasicAuthHandler(password_mgr) @@ -64,6 +65,7 @@ def suse_packages(proj: str) -> Iterable[str]: ETag management won't work here, because I don't know about any way how to return it in iterator. """ + log.debug("url = {}".format(OBS_base + f'/source/{proj}')) req = Request(url=OBS_base + f'/source/{proj}') with open('exceptions.json') as exc_f: exc_dict = json.load(exc_f) |