Compare commits

...

9 Commits

View File

@@ -59,14 +59,14 @@ class RedmineAPI(RedmineConfig):
if on_success: if on_success:
on_success(activity) on_success(activity)
tracked.append(activity) tracked.append(activity)
logger.info(f"{Fore.GREEN}{activity} успешно занесена в Redmine{Fore.RESET}".ljust(60) + "") logger.info(f"{Fore.GREEN}{activity}: успешно {Fore.RESET}".ljust(100) + "")
else: else:
try: try:
errors = resp.json()["errors"] errors = resp.json()["errors"]
except Exception: except Exception:
errors = resp.text errors = resp.text
logger.debug(errors) logger.debug(errors)
logger.error(f"{Fore.RED}{activity} не была занесена в Redmine{Fore.RESET}".ljust(60) + "") logger.error(f"{Fore.RED}{activity}: с ошибкой {Fore.RESET}".ljust(100) + "")
logger.error(f"{errors} {resp.status_code}") logger.error(f"{errors} {resp.status_code}")
failed_activities.append(activity) failed_activities.append(activity)
except Exception as e: except Exception as e: