commit df4901fad1cd5f598ef0a2d9e74f8dfa909fb6ed
parent de4acd0319755707bd069b2ac81fe9483f9a39ec
Author: Marcel <mtrnord1@gmail.com>
Date: Thu, 16 Feb 2017 13:19:23 +0100
fix requirements.txt and config creation
Diffstat:
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/bot.py b/bot.py
@@ -124,7 +124,7 @@ if __name__ == "__main__":
except (OSError, IOError) as e:
sys.exit('Failed to copy default memory file: {}'.format(e))
else:
- os.mkdir("config")
+ os.makedirs("config")
if not os.path.isfile(os.path.join('config', 'config.json')):
try:
shutil.copy(os.path.join('defaults', 'config.json'), os.path.join('config', 'config.json'))
diff --git a/bot/config.py b/bot/config.py
@@ -94,7 +94,7 @@ class Config(collections.MutableMapping):
if self.failsafe_backups:
self._make_failsafe_backup()
- with open(self.filename, 'w') as f:
+ with open(self.filename, 'w+') as f:
json.dump(self.config, f, indent=2, sort_keys=True)
self.changed = False
interval = time.time() - start_time
@@ -256,7 +256,7 @@ class Memory(collections.MutableMapping):
if self.failsafe_backups:
self._make_failsafe_backup()
- with open(self.filename, 'w') as f:
+ with open(self.filename, 'w+') as f:
json.dump(self.config, f, indent=2, sort_keys=True)
self.changed = False
interval = time.time() - start_time
diff --git a/requirements.txt b/requirements.txt
@@ -1,2 +1,2 @@
--e git+https://github.com/Nordgedanken/python-slackclient.git@f3ae3c94888bca514cd17277f4b2bf32fe795e92#egg=master
+git+https://github.com/Nordgedanken/python-slackclient.git@master#egg=slackclient
python-telegram-bot