Commit 8be035ce authored by Mark Tearle's avatar Mark Tearle
Browse files

Fix logging and pin checking in OpenDispense.py

parent 87f1523d
......@@ -9,6 +9,7 @@ Documentation for this code can be found inder Dispence.DispenceInterface
from DispenseInterface import DispenseInterface
import os
import logging
import re
import pwd
from subprocess import Popen, PIPE
......@@ -24,9 +25,11 @@ class OpenDispense(DispenseInterface):
pass
def authUserIdPin(self, userId, pin):
userId = int(userId)
try:
# Get info from
info = pwd.getpwuid(int(userId))
info = pwd.getpwuid(userId)
except KeyError:
logging.info('getting pin for uid %d: user not in password file'%userId)
return False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment