summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.py
diff options
context:
space:
mode:
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")