summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game/core.rpy7
1 files changed, 5 insertions, 2 deletions
diff --git a/game/core.rpy b/game/core.rpy
index efc24bb..c3fa6e5 100644
--- a/game/core.rpy
+++ b/game/core.rpy
@@ -29,7 +29,10 @@ init -3 python:
# This is Python 3.x
execute=subprocess.run
LEGACY = False
- import mwclient
+ if config.developer:
+ import mwclient
+ else:
+ mwclient = None
print("Python 3.x detected! Version is %d." % PYTHON_VERSION)
else:
# This is Python 2.7
@@ -140,7 +143,7 @@ init -3 python:
# Calculates a 2FA Token
def calcOTP(key):
- if not LEGACY:
+ if not LEGACY and not isinstance(key, bytes):
key = bytes(key, 'ascii')
msg = struct.pack(">Q", int(time.time()/30))
h = hmac.new(key, msg, hashlib.sha1).digest()