get rid of defaults, hardcode stuff instead, also use os.chdir into config dir
This commit is contained in:
parent
acc390ef11
commit
9eeabd8ae9
4 changed files with 7 additions and 17 deletions
|
@ -4,7 +4,6 @@ import sys
|
|||
|
||||
import aiocron
|
||||
import telethon
|
||||
import pgbotlib.defaults
|
||||
import pgbotlib.response
|
||||
import pgbotlib.misc
|
||||
import pytz
|
||||
|
@ -16,8 +15,8 @@ class Cron:
|
|||
config: dict,
|
||||
client: telethon.TelegramClient,
|
||||
responder: pgbotlib.response.Responder) -> None:
|
||||
schedule_conf = config.get('schedule', pgbotlib.defaults.SCHEDULE)
|
||||
local_tz = config.get('timezone', pgbotlib.defaults.TZ)
|
||||
schedule_conf = config.get('schedule', 'sched.yml')
|
||||
local_tz = config.get('timezone', 'UTC')
|
||||
try:
|
||||
self.tz = pytz.timezone(local_tz)
|
||||
except pytz.exceptions.UnknownTimeZoneError as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue