Skip to content

Commit 4e249d8

Browse files
committed
clean
1 parent 1980d11 commit 4e249d8

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

sample/sample_varnishlog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def execute(self,vap):
99
self.vap = vap
1010
while 1:
1111
ret = self.vap.Dispatch(self.vapCallBack)
12-
if 0 == ret:
12+
if 0 >= ret:
1313
time.sleep(0.5)
1414

1515

sample/sample_varnishstat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# coding: utf-8
44
import varnishapi
55

6-
vsc = varnishapi.VarnishStat()
6+
arg = {}
7+
8+
vsc = varnishapi.VarnishStat(**arg)
79
if vsc.error:
810
print(vsc.error)
911
exit(1)

src/varnishapi.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,6 @@ def getStats(self):
14711471
return self._buf
14721472

14731473

1474-
14751474
class VarnishLog(VarnishAPI):
14761475

14771476
def __init__(self, opt='', sopath='libvarnishapi.so.1', dataDecode=True):
@@ -1724,7 +1723,6 @@ def _callBack(self, vsl, pt, fo):
17241723
'reason': tra.reason,
17251724
}
17261725

1727-
17281726
while 1:
17291727
i = self.lva.VSL_Next(tra.c)
17301728
if i < 0:

0 commit comments

Comments
 (0)