Skip to content

Commit

Permalink
Update spoolman.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeanon committed Jan 21, 2024
1 parent b485d26 commit 7c2c838
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions moonraker/components/spoolman.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ def _get_spoolman_urls(self, config: ConfigHelper) -> None:

def _get_website_urls(self, config: ConfigHelper):
orig_website_url = config.get('website', self.spoolman_url)
website_url_match = re.match(r"(?i:(?P<scheme>https?)://)?(?P<host>.+)", orig_website_url)
website_url_match = re.match(r"(?i:(?P<scheme>https?)://)?(?P<host>.+)",
orig_website_url)
if website_url_match is None:
raise config.error(
f"Section [spoolman], Option website: {orig_website_url}: Invalid URL format"
f"Section [spoolman], Option website: {orig_website_url}: "
f"Invalid URL format"
)

def _register_notifications(self):
Expand Down

0 comments on commit 7c2c838

Please sign in to comment.