Skip to content

Commit

Permalink
Make sure sarc.client can be imported only when sarc mode is not "scr…
Browse files Browse the repository at this point in the history
…aping"
  • Loading branch information
notoraptor committed Jun 26, 2024
1 parent a7ebe6c commit f7979cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sarc/client/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from sarc.config import ConfigurationError, ScraperConfig, config

if isinstance(config(), ScraperConfig):
raise ConfigurationError("sarc.client cannot be used in scraping mode.")

0 comments on commit f7979cf

Please sign in to comment.