commit:     12356f10563d378306b3eeafa7b708e5d4888477
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 01:46:35 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Oct 10 01:52:10 2015 +0000
URL:        https://gitweb.gentoo.org/proj/grss.git/commit/?id=12356f10

grs/Interpret.py and Execute.py: pid is out of scope.

 grs/Execute.py   |  4 ++--
 grs/Interpret.py | 10 +++++-----
 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()
 
 

Reply via email to