[MediaWiki-commits] [Gerrit] varnishlog4.py: log errors in execute() - change (operations/puppet)

2016-06-10 Thread Ema (Code Review)
Ema has submitted this change and it was merged.

Change subject: varnishlog4.py: log errors in execute()
..


varnishlog4.py: log errors in execute()

We should log errors set by python-varnishapi instead of ignoring them.

Bug: T137114
Change-Id: I8e4186089fffcb3ea9351bec7a24e03eb141edba
---
M modules/varnish/files/varnishlog4.py
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Ema: Verified; Looks good to me, approved



diff --git a/modules/varnish/files/varnishlog4.py 
b/modules/varnish/files/varnishlog4.py
index f3fed5d..433e4d3 100755
--- a/modules/varnish/files/varnishlog4.py
+++ b/modules/varnish/files/varnishlog4.py
@@ -55,6 +55,7 @@
   limitations under the License.
 """
 
+import sys
 import time
 import signal
 import inspect
@@ -93,6 +94,10 @@
 """Loop and execute callback"""
 while self.keep_running:
 ret = self.vap.Dispatch(self.vap_callback)
+if self.vap.error:
+sys.stderr.write("Error in execute(): %s\n" % self.vap.error)
+self.vap.error = ''
+
 if ret == 0:
 time.sleep(0.01)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/293123
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e4186089fffcb3ea9351bec7a24e03eb141edba
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Elukey 
Gerrit-Reviewer: Ema 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] varnishlog4.py: log errors in execute() - change (operations/puppet)

2016-06-07 Thread Ema (Code Review)
Ema has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/293123

Change subject: varnishlog4.py: log errors in execute()
..

varnishlog4.py: log errors in execute()

We should log errors set by python-varnishapi instead of ignoring them.

Bug: T137114
Change-Id: I8e4186089fffcb3ea9351bec7a24e03eb141edba
---
M modules/varnish/files/varnishlog4.py
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/23/293123/1

diff --git a/modules/varnish/files/varnishlog4.py 
b/modules/varnish/files/varnishlog4.py
index 3392ab8..e5372e3 100755
--- a/modules/varnish/files/varnishlog4.py
+++ b/modules/varnish/files/varnishlog4.py
@@ -41,6 +41,7 @@
   limitations under the License.
 """
 
+import sys
 import time
 import signal
 import inspect
@@ -79,6 +80,9 @@
 """Loop and execute callback"""
 while self.keep_running:
 ret = self.vap.Dispatch(self.vap_callback)
+if self.vap.error:
+sys.stderr.write("Error in execute(): %s\n" % self.vap.error)
+
 if ret == 0:
 time.sleep(0.01)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/293123
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e4186089fffcb3ea9351bec7a24e03eb141edba
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits