twitter.archive: fix legacy config detection
apparently .name contains the parent module so previously it was throwing the exception instead
This commit is contained in:
parent
c8cf0272f9
commit
ca91be8154
1 changed files with 2 additions and 1 deletions
|
@ -8,7 +8,8 @@ Twitter data (uses [[https://help.twitter.com/en/managing-your-account/how-to-do
|
||||||
try:
|
try:
|
||||||
from my.config import twitter_archive as user_config
|
from my.config import twitter_archive as user_config
|
||||||
except ImportError as ie:
|
except ImportError as ie:
|
||||||
if ie.name != 'twitter_archive':
|
if not (ie.name == 'my.config' and 'twitter_archive' in str(ie)):
|
||||||
|
# must be caused by something else
|
||||||
raise ie
|
raise ie
|
||||||
try:
|
try:
|
||||||
from my.config import twitter as user_config # type: ignore[misc]
|
from my.config import twitter as user_config # type: ignore[misc]
|
||||||
|
|
Loading…
Add table
Reference in a new issue