Change how config is loaded from env for testing

This commit is contained in:
Dylan committed 2023-07-02 17:54:49 +01:00
1 parent 828dbdca04
commit c098c0aad4
5 files changed
+26 -19

No files matched your search

+2
View File
@@ -27,6 +27,8 @@ def extractStatus_fallback(url):
if m is None:
raise twExtractError.TwExtractError(400, "Extract error")
twid = m.group(2)
if config["config"]["workaroundTokens"] == None:
raise twExtractError.TwExtractError(400, "Extract error (no tokens defined)")
# get tweet
tokens = config["config"]["workaroundTokens"].split(",")
for authToken in tokens: