Skip to content
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

Merged
merged 1 commit into from
Sep 18, 2024
Merged

handle empty disputer config #17

merged 1 commit into from
Sep 18, 2024

Conversation

dsm-ll
Copy link
Contributor

@dsm-ll dsm-ll commented Sep 17, 2024

No description provided.

@darren-ll darren-ll merged commit 1b125e0 into main Sep 18, 2024
2 checks passed
@darren-ll darren-ll deleted the empty-disputer-config branch September 18, 2024 03:02
Copy link

@KolomboPulse KolomboPulse left a 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")

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")

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

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

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

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}")
Copy link

@KolomboPulse KolomboPulse Sep 23, 2024

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}")

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}")

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}")

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}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants