Ori.livneh has submitted this change and it was merged.

Change subject: varnishlog: allow passing NULL parameter to VCL_Arg()
......................................................................


varnishlog: allow passing NULL parameter to VCL_Arg()

VCL args like '-c' or '-b' don't take a value.

Change-Id: I52df58aa519b9683d58ca285456468d67bd68a67
---
M modules/varnish/files/varnishlog.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/modules/varnish/files/varnishlog.py 
b/modules/varnish/files/varnishlog.py
index ec676d8..ab9c968 100755
--- a/modules/varnish/files/varnishlog.py
+++ b/modules/varnish/files/varnishlog.py
@@ -90,7 +90,8 @@
 
     # Initialize with provided vsl_args
     for (arg, value) in vsl_args:
-        if varnishapi.VSL_Arg(vd, ord(arg), value.encode('utf-8')) != 1:
+        arg_value = value.encode('utf-8') if value is not None else value
+        if varnishapi.VSL_Arg(vd, ord(arg), arg_value) != 1:
             raise OSError('VSL_Arg(vd, "%s", "%s")' % (arg, value))
 
     if varnishapi.VSL_Open(vd, 1) != 0:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I52df58aa519b9683d58ca285456468d67bd68a67
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to