Skip to content

Commit f3a7b12

Browse files
committed
bugfix : argument was unicode when taken out of mw.conf
1 parent 9846513 commit f3a7b12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

anknotes/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ def encode(key, clear):
319319
return base64.urlsafe_b64encode("".join(enc))
320320

321321
def decode(key, enc):
322+
if not isinstance(enc, str):
323+
enc = enc.encode('ascii', 'ignore')
322324
dec = []
323325
enc = base64.urlsafe_b64decode(enc)
324326
for i in range(len(enc)):

0 commit comments

Comments
 (0)