Wow that was pretty low-grade of me
This commit is contained in:
parent
0a11464ce6
commit
748ba97d94
|
@ -1,12 +1,13 @@
|
||||||
import requests as r
|
import requests as r
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
from os import path
|
||||||
import json as j
|
import json as j
|
||||||
|
|
||||||
os.chdir('/home/wisknort/lyricise') # Do this first so that the following work.
|
getfile=lambda x: path.join(path.dirname(__file__),x)
|
||||||
with open('config.json') as b: conf=j.load(b)
|
with open(getfile('config.json')) as b: conf=j.load(b)
|
||||||
import importlib as il
|
import importlib as il
|
||||||
sources=[il.import_module(f'sources.{n[:-3]}') for n in os.listdir('sources') if n.endswith('.py')]
|
sources=[il.import_module(f'sources.{n[:-3]}') for n in os.listdir(getfile('sources')) if n.endswith('.py')]
|
||||||
sources=list(filter(lambda x:x.enabled,sources))
|
sources=list(filter(lambda x:x.enabled,sources))
|
||||||
class FlashyNotMountedError(Exception):
|
class FlashyNotMountedError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue
Block a user