aboutsummaryrefslogtreecommitdiff
path: root/grs
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-10-09 21:46:35 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-10-09 21:52:10 -0400
commit12356f10563d378306b3eeafa7b708e5d4888477 (patch)
tree150b172799fcd215879c971edc35de1623f77e2b /grs
parentgrs/Interpret.py: clean up white space padding on _line. (diff)
downloadgrss-12356f10563d378306b3eeafa7b708e5d4888477.tar.gz
grss-12356f10563d378306b3eeafa7b708e5d4888477.tar.bz2
grss-12356f10563d378306b3eeafa7b708e5d4888477.zip
grs/Interpret.py and Execute.py: pid is out of scope.
Diffstat (limited to 'grs')
-rw-r--r--grs/Execute.py4
-rw-r--r--grs/Interpret.py10
2 files changed, 7 insertions, 7 deletions
diff --git a/grs/Execute.py b/grs/Execute.py
index 0690e8e..0e70221 100644
--- a/grs/Execute.py
+++ b/grs/Execute.py
@@ -74,14 +74,14 @@ class Execute():
if _rc:
_file.write('EXIT CODE: %d\n' % _rc)
if not failok:
- _file.write('SENDING SIGTERM to pid = %d\n' % pid)
+ _file.write('SENDING SIGTERM\n')
_file.close()
signalexit()
if timed_out:
_file.write('TIMEOUT ERROR: %s\n' % cmd)
if not failok:
- _file.write('SENDING SIGTERM to pid = %d\n' % pid)
+ _file.write('SENDING SIGTERM\n')
_file.close()
signalexit()
diff --git a/grs/Interpret.py b/grs/Interpret.py
index 4f184a0..12271d6 100644
--- a/grs/Interpret.py
+++ b/grs/Interpret.py
@@ -86,19 +86,19 @@ class Interpret(Daemon):
time.sleep(2.0)
- def semantic_action(_line, objs, n, execstr):
+ def semantic_action(_line, objs, num_objs, execstr):
""" Execute the directive """
if self.mock_run:
_lo.log(_line)
return
try:
- if len(objs) < n:
+ if len(objs) < num_objs:
raise Exception('Number of objs for verb incorrect.')
exec(execstr)
- except Exception as e:
+ except Exception as err:
_lo.log('Bad command: %s' % _line)
- _lo.log('Exception throw: %s' % e)
- _lo.log('SENDING SIGTERM to pid = %d\n' % pid)
+ _lo.log('Exception throw: %s' % err)
+ _lo.log('SENDING SIGTERM\n')
signalexit()