summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2021-04-16 13:00:36 +0200
committerPierre Ossman <ossman@cendio.se>2021-04-16 13:00:36 +0200
commitda130946eba1e68b08846330a23c58bf6c44a7cc (patch)
tree2f4265cad3f299d399cfc60f3f89c3dafe4aec05
parent100a776409af402d4de28f67a5c0de6233df2cbd (diff)
parent663b39cd388bd7aa00afa4f6fb340b2690cae25a (diff)
downloadwebsockify-da130946eba1e68b08846330a23c58bf6c44a7cc.tar.gz
Merge branch 'sisou/split-tokens-tab' of https://github.com/sisou/websockify
-rw-r--r--websockify/token_plugins.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/websockify/token_plugins.py b/websockify/token_plugins.py
index 3b3e3e8..0484023 100644
--- a/websockify/token_plugins.py
+++ b/websockify/token_plugins.py
@@ -1,6 +1,7 @@
import os
import sys
import time
+import re
class BasePlugin():
def __init__(self, src):
@@ -31,7 +32,7 @@ class ReadOnlyTokenFile(BasePlugin):
for line in [l.strip() for l in open(f).readlines()]:
if line and not line.startswith('#'):
try:
- tok, target = line.split(': ')
+ tok, target = re.split(':\s', line)
self._targets[tok] = target.strip().rsplit(':', 1)
except ValueError:
print("Syntax error in %s on line %d" % (self.source, index), file=sys.stderr)