You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/env python3
from jnpr.junos import Device
from jnpr.junos.utils.start_shell import StartShell
def try_run():
dev = Device("foobar", user="foo", passwd="bar",port=22)
with StartShell(dev) as ss:
result = ss.run("hostname", sleep=2)
print(result)
if __name__ == "__main__":
try_run()
// result
Traceback (most recent call last):
File "repro.py", line 26, in <module>
try_run()
File "repro.py", line 23, in try_run
result = ss.run("hostname", sleep=2)
File "/Users/foobar/scripts/pyez_test_scripts/venv/lib/python3.6/site-packages/jnpr/junos/utils/start_shell.py", line 195, in run
got = "".join(self.wait_for(this, timeout, sleep=sleep))
File "/Users/foobar/scripts/pyez_test_scripts/venv/lib/python3.6/site-packages/jnpr/junos/utils/start_shell.py", line 88, in wait_for
time.sleep(sleep)
NameError: name 'time' is not defined
The text was updated successfully, but these errors were encountered:
PyEZ version 2.6.5
// result
The text was updated successfully, but these errors were encountered: