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

Fix logging and pin checking in

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):
def authUserIdPin(self, userId, pin):
userId = int(userId)
# Get info from
info = pwd.getpwuid(int(userId))
info = pwd.getpwuid(userId)
except KeyError:'getting pin for uid %d: user not in password file'%userId)
return False
Supports Markdown
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