Skip to content

Commit

Permalink
Fixed minor issue in the lwaftr monitor & a mutex issue in the daemon…
Browse files Browse the repository at this point in the history
…ized jetapp.
  • Loading branch information
amanand committed Oct 5, 2016
1 parent 51e28ab commit 199bb55
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 199bb55

Please sign in to comment.