Skip to content

Commit

Permalink
Merge pull request #46 from phate999/master
Browse files Browse the repository at this point in the history
Added tornado_sample
  • Loading branch information
dapplegatecp authored Apr 1, 2021
2 parents bafdb2c + 634fe20 commit 293de9b
Show file tree
Hide file tree
Showing 12 changed files with 1,245 additions and 1,881 deletions.
2,289 changes: 410 additions & 1,879 deletions Cradlepoint NCOS SDK 3.0 Application Developers Guide.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ping_sample/ping_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ def ping(host, **kwargs):
try_count = 0
while try_count < 15:
result = cp.get('control/ping')
if result and result.get('data', {}).get('status') in ["error", "done"]:
if result and result.get('status') in ["error", "done"]:
break
time.sleep(2)
try_count += 1
if try_count == 15:
pingstats['error'] = "No Results - Execution Timed Out"
else:
# Parse results text
parsedresults = result.get('data', {}).get('result').split('\n')
parsedresults = result.get('result').split('\n')
i = 0
index = 1
for item in parsedresults:
Expand Down
1 change: 1 addition & 0 deletions tornado_sample/all_css.css

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions tornado_sample/cp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""Monkay patch for cp.uptime()"""

import time

def uptime():
return time.time()
Loading

0 comments on commit 293de9b

Please sign in to comment.