Refactored the directory variables minimally
This commit is contained in:
parent
3f007cc83f
commit
b6c9d025a8
@ -16,14 +16,13 @@ import MySQLdb as mysql
|
||||
|
||||
from matrix_bot_api.mregex_handler import MRegexHandler
|
||||
|
||||
EVENTS_DATA_DIR = os.path.join(os.path.dirname(__file__),
|
||||
'../../data/events')
|
||||
DATA_LOCATION = os.path.join(os.path.dirname(__file__),
|
||||
'../../data/events/data.db')
|
||||
MESSAGE_DIR = os.path.join(os.path.dirname(__file__), 'messages')
|
||||
DATA_DIR = os.path.join(os.path.dirname(__file__),'../../data/events')
|
||||
CONFIG_LOCATION = os.path.join(os.path.dirname(__file__), 'config.json')
|
||||
HELP_LOCATION = os.path.join(os.path.dirname(__file__), 'messages/help')
|
||||
MESSAGES_LOCATION = os.path.join(os.path.dirname(__file__),
|
||||
'messages/messages.dutch.json')
|
||||
|
||||
DATA_LOCATION = DATA_DIR + '/data.db'
|
||||
HELP_LOCATION = MESSAGE_DIR + '/help'
|
||||
MESSAGES_LOCATION = MESSAGE_DIR + '/messages.dutch.json'
|
||||
|
||||
class Plugin:
|
||||
""" This plugin grabs events from Admidio (https://admidio.org)
|
||||
@ -248,7 +247,7 @@ def setup():
|
||||
SQLite tables."""
|
||||
|
||||
# Try to make a new directory
|
||||
os.mkdir(EVENTS_DATA_DIR)
|
||||
os.mkdir(DATA_DIR)
|
||||
|
||||
# Define query to INSERT event table to SQLite DB
|
||||
sql = """CREATE TABLE 'events' (
|
||||
|
Loading…
Reference in New Issue
Block a user