Skip to content

Commit

Permalink
Updated based on pull feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfzc committed Oct 8, 2015
1 parent 0db33ca commit 3ed388f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
13 changes: 4 additions & 9 deletions examples/normalizer/Normalize.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
#!/usr/bin/python
#!/usr/bin/env python

import os
import re
import sys
import time
import csv
from datetime import datetime, timedelta
from trigger.netdevices import NetDevices
from trigger.cmds import ReactorlessCommando
from twisted.python import log
from twisted.internet import defer, task, reactor
from twisted.internet import reactor
from Router import Router
import jsonpickle

Expand Down Expand Up @@ -106,7 +101,7 @@ def stop_reactor(result):


def main():
nd = NetDevices()
# nd = NetDevices()

global device_list
device_list = []
Expand All @@ -119,7 +114,7 @@ def main():
stateFile.close()
routers = jsonpickle.decode(data)
data = None
except Exception as e:
except Exception:
print("Failed to open routerstate.json")

# Accept a list of routers and argument or parse test-units.csv
Expand Down
17 changes: 5 additions & 12 deletions examples/normalizer/Report.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
#!/usr/bin/python -u
#!/usr/bin/env python

import os
import re
import sys
import time
import csv
import ipdb
import jsonpickle
from trigger.netdevices import NetDevices
from trigger.cmds import ReactorlessCommando
from twisted.python import log
from twisted.internet import defer, task, reactor
from IPy import IP
from twisted.internet import reactor
from Router import Router
from datetime import datetime, timedelta
from datetime import datetime


class getRouterDetails(ReactorlessCommando):
Expand Down Expand Up @@ -66,7 +59,7 @@ def stop_reactor(result):


def main():
nd = NetDevices()
# nd = NetDevices()

global device_list
device_list = []
Expand All @@ -90,7 +83,7 @@ def main():
stateFile.close()
routers = jsonpickle.decode(data)
data = None
except Exception as e:
except Exception:
print("Failed to open routerstate.json")

for device in device_list:
Expand Down
4 changes: 3 additions & 1 deletion examples/normalizer/Router.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env python

import re
from datetime import datetime, timedelta
from datetime import datetime


class Router(object):
Expand Down

0 comments on commit 3ed388f

Please sign in to comment.