_res.raise_for_status()
# TODO: save in persistence config.ini
- print(f"INFO: mirror SUCCESS '{mirror}'")
+ print("INFO: mirror SUCCESS '%s'" % mirror)
return mirror
except (requests.exceptions.ConnectionError, requests.exceptions.HTTPError):
- print(f"WARN: mirror FAILURE '{mirror}'")
+ print("WARN: mirror FAILURE '%s'" % mirror)
return str()
def post(self, path: str, data: dict) -> requests.Response:
"""Post data to the API."""
_res = requests.post(
- f"{self.host}/{path}",
+ self.host + "/" + path,
json=data,
timeout=(REQUEST_CONNECT_TIMEOUT, REQUEST_READ_TIMEOUT),
)
),
)
except sqlite3.IntegrityError as exc:
- print(f"WARN: {repr(exc)}")
+ print("WARN: %s" % repr(exc))
dupe_bug_insertion_exc = (
"IntegrityError('UNIQUE constraint failed: bug.arguments, bug.stack')"
)
n_bugs_total = len(bugs)
n_bugs_unsubmitted = len([x for x in bugs if not bool(x["submitted"])])
- print(f"You have: {n_bugs_total} total bugs amassed in your journey.")
- print(f"Of these, {n_bugs_unsubmitted} require submission/reporting.")
+ print("You have: %s total bugs amassed in your journey." % n_bugs_total)
+ print("Of these, %s require submission/reporting." % n_bugs_unsubmitted)
print()
for bug in bugs:
api_client = ntclient.services.api.ApiClient()
n_submitted = 0
- print(f"submitting {len(bugs)} bug reports...")
+ print("submitting %s bug reports..." % len(bugs))
print("_" * len(bugs))
for bug in bugs: