diff options
| author | 2018-09-27 12:35:09 +0100 | |
|---|---|---|
| committer | 2018-09-27 12:35:09 +0100 | |
| commit | 5674dc4a826cfd5b5a33d9a40893f11ca32e51ec (patch) | |
| tree | 1740b2fc6fa7df021a9145edbf4261a8536ce46b | |
| parent | Pass parent EventHook down to children (diff) | |
| signature | ||
Open module files explicitly as utf8 in ModuleManager
| -rw-r--r-- | src/ModuleManager.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ModuleManager.py b/src/ModuleManager.py index dcf87230..7787d9f3 100644 --- a/src/ModuleManager.py +++ b/src/ModuleManager.py @@ -1,4 +1,4 @@ -import glob, imp, inspect, os, sys, uuid +import glob, imp, io, inspect, os, sys, uuid BITBOT_HOOKS_MAGIC = "__bitbot_hooks" BITBOT_EXPORTS_MAGIC = "__bitbot_exports" @@ -50,7 +50,7 @@ class ModuleManager(object): def _load_module(self, name): path = self._module_path(name) - with open(path) as module_file: + with io.open(path, mode="r", encoding="utf8") as module_file: while True: line = module_file.readline().strip() line_split = line.split(" ") |
