summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.py
diff options
context:
space:
mode:
authorkhilman <khilman@users.noreply.github.com>2018-07-24 07:55:15 -0500
committerGitHub <noreply@github.com>2018-07-24 07:55:15 -0500
commitbaf680990ecb539cde0a16ef5b32a7321dd4538a (patch)
tree5362228f4a266208bacb24f441c9b4c611563388 /lavalab-gen.py
parentef276f04512f1808ae7e9fbb2e3b904855486462 (diff)
parent76a084e4d15a1bdd95747d59bd7ffe00cc78f747 (diff)
Merge pull request #35 from montjoie/token_fix
lavalab-gen.py: token is optional for users
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-xlavalab-gen.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py
index 8f55670..7596818 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -159,8 +159,9 @@ def main():
print("WARNING: unknown keyword %s" % keyword)
username = user["name"]
ftok = open("%s/%s" % (userdir, username), "w")
- token = user["token"]
- ftok.write("TOKEN=" + token + "\n")
+ if "token" in user:
+ token = user["token"]
+ ftok.write("TOKEN=" + token + "\n")
if "password" in user:
password = user["password"]
ftok.write("PASSWORD=" + password + "\n")