fix getfaction script, return email

This commit is contained in:
Enno Rehling 2019-01-20 03:06:33 +01:00
parent dda0fd9d27
commit 8eba9d6eaf
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
import sys, re
from epasswd import EPasswd
if len(sys.argv)<4:
if len(sys.argv)<3:
sys.exit(-2)
filename=sys.argv[1]
@ -23,8 +23,8 @@ except:
log("loaded from file " + filename)
if pw_data.fac_exists(myfaction):
log("faction found: " + myfaction)
print(pw_data.get_email(myfaction))
log("faction found: " + myfaction)
sys.exit(0)
else:
log("faction missing: " + myfaction)