Don't crash if no data saved, mount gcal stuff in docker
This commit is contained in:
parent
b48884fd5b
commit
b8c9df8a31
|
@ -6,5 +6,6 @@ COPY Pipfile .
|
|||
RUN pipenv install --skip-lock --system
|
||||
|
||||
COPY bot.py .
|
||||
COPY modules .
|
||||
|
||||
CMD [ "python", "-u", "./bot.py" ]
|
||||
|
|
2
bot.py
2
bot.py
|
@ -61,6 +61,8 @@ class Bot:
|
|||
self.set_account_data(data)
|
||||
|
||||
def load_settings(self, data):
|
||||
if not data:
|
||||
return
|
||||
if not data.get('module_settings'):
|
||||
return
|
||||
for modulename, moduleobject in self.modules.items():
|
||||
|
|
|
@ -12,3 +12,6 @@ services:
|
|||
- MATRIX_PASSWORD
|
||||
- MATRIX_SERVER
|
||||
- JOIN_ON_INVITE
|
||||
volumes:
|
||||
- ${PWD}/credentials.json:/bot/credentials.json
|
||||
- ${PWD}/token.pickle:/bot/token.pickle
|
||||
|
|
Loading…
Reference in New Issue