diff options
author | Pierre Ossman <ossman@cendio.se> | 2021-04-16 13:00:36 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2021-04-16 13:00:36 +0200 |
commit | da130946eba1e68b08846330a23c58bf6c44a7cc (patch) | |
tree | 2f4265cad3f299d399cfc60f3f89c3dafe4aec05 | |
parent | 100a776409af402d4de28f67a5c0de6233df2cbd (diff) | |
parent | 663b39cd388bd7aa00afa4f6fb340b2690cae25a (diff) | |
download | websockify-da130946eba1e68b08846330a23c58bf6c44a7cc.tar.gz |
Merge branch 'sisou/split-tokens-tab' of https://github.com/sisou/websockify
-rw-r--r-- | websockify/token_plugins.py | 3 |
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) |