-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle empty disputer config #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handle empty disputer config #17
@@ -302,8 +302,7 @@ async def start( | |||
logger.warning("TWILIO environment variables not configured") | |||
|
|||
if not disp_cfg.monitored_feeds: | |||
logger.error("No feeds set for monitoring, please add feeds to ./disputer-config.yaml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.error("No feeds set for monitoring, please add feeds to ./disputer-config.yaml")
@@ -302,8 +302,7 @@ async def start( | |||
logger.warning("TWILIO environment variables not configured") | |||
|
|||
if not disp_cfg.monitored_feeds: | |||
logger.error("No feeds set for monitoring, please add feeds to ./disputer-config.yaml") | |||
return | |||
logger.warning("No feeds set for monitoring, please add feeds to ./disputer-config.yaml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.warning("No feeds set for monitoring, please add feeds to ./disputer-config.yaml")
@@ -302,8 +302,7 @@ async def start( | |||
logger.warning("TWILIO environment variables not configured") | |||
|
|||
if not disp_cfg.monitored_feeds: | |||
logger.error("No feeds set for monitoring, please add feeds to ./disputer-config.yaml") | |||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return
@@ -1,9 +1,9 @@ | |||
"""contains AutoDisputerConfig class for adjusting the settings of the auto-disputer""" | |||
import logging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import logging
from dataclasses import dataclass | ||
from typing import Any | ||
from typing import List | ||
from typing import Optional | ||
from pathlib import Path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from pathlib import Path
except TypeError as e: | ||
logging.error(f"Python Box attribute error: {e}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging.error(f"Python Box attribute error: {e}")
except TypeError as e: | ||
logging.error(f"Python Box attribute error: {e}") | ||
logger.error(f"Python Box attribute error: {e}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger
except Exception as e: | ||
logging.error(f"Error configuring datafeed_query_tag: {e}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging
except Exception as e: | ||
logging.error(f"Error configuring datafeed_query_tag: {e}") | ||
logger.error(f"Error configuring datafeed_query_tag: {e}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger
return None | ||
|
||
datafeed_query_tag = None | ||
try: | ||
if hasattr(self.box.feeds[i], "datafeed_query_tag"): | ||
datafeed_query_tag = self.box.feeds[i].datafeed_query_tag | ||
except AttributeError as e: | ||
logging.error(f"Python Box attribute error: {e}") | ||
logger.error(f"Python Box attribute error: {e}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger
No description provided.