Skip to content

Commit

Permalink
Merge pull request snabbco#1 from amanand/igalia
Browse files Browse the repository at this point in the history
Fixed minor issue in the lwaftr monitor & a mutex issue in the daemonized app.
  • Loading branch information
Marcel Wiget authored Oct 6, 2016
2 parents 51e28ab + 199bb55 commit 3b34723
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion jetapp/yang/op/rpc-jet.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ def lwaftr_snmp(self):
try:
with open(SNABB_FILENAME, "r") as f:
output = f.read()
mutex.release()
except Exception as e:
print "lwaftr_snmp hit exception: ", e.message
output = self.lwaftr()
mutex.release()
mutex.release()
return output


Expand Down
7 changes: 6 additions & 1 deletion jetapp/yang/op/rpc_monitor_lwaftr.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,16 @@ def monitor(self, server, argv):
jcs.output("%s" %e.message)
exit(0)
# newstats contains all the latest stats
instance_id = ""
for i in range(0,len(argv)):
if argv[i] == "id":
instance_id = argv[i+1]
break
newtime = time.time()
root = ET.fromstring(newstats)
found = 0
for instance in root:
if len(argv) != 1 and instance.findall("./id")[0].text != argv[2]:
if instance_id != "" and instance.findall("./id")[0].text != argv[2]:
pass
else:
self.id = instance.findall("./id")[0].text
Expand Down

0 comments on commit 3b34723

Please sign in to comment.