Fixed two small syntax errors

This commit is contained in:
Seth House 2012-11-01 09:43:55 -06:00
parent 4425aa1170
commit 8c6acd173e

View File

@ -2,6 +2,7 @@ import logging
import os
import signal
import time
import sys
log = logging.getLogger(__name__)
@ -36,8 +37,8 @@ def set_pidfile(pidfile, user):
sys.exit(2)
try:
os.chown(pidfile, uid, gid)
except Error as e:
msg = ('Failed to set the pid to user {0}').format(ser)
except Exception as e:
msg = ('Failed to set the pid to user {0}').format(user)
sys.stderr.write(msg)
sys.exit(e.errno)
log.debug(('Chowned pidfile: {0} to user: {1}').format(pidfile, user))