From 8c6acd173ec3f1e272959af49b6d03cf43a62867 Mon Sep 17 00:00:00 2001 From: Seth House Date: Thu, 1 Nov 2012 09:43:55 -0600 Subject: [PATCH] Fixed two small syntax errors --- salt/utils/process.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/salt/utils/process.py b/salt/utils/process.py index d262cd5748..eea075b40e 100644 --- a/salt/utils/process.py +++ b/salt/utils/process.py @@ -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))