Repository: Juniper/py-junos-eznc

Issue:
Shell session does not work for root user.
I'm using the below example program. 

```
#!/usr/bin/env python
import jnpr.junos.utils
from   jnpr.junos import Device
from   jnpr.junos.utils import *
from   jnpr.junos.utils.start_shell import *
from   jnpr.junos.utils.start_shell import StartShell

DUT = Device(host='10.252.191.104', user="root", passwd = "password!")
DUT.open()
print "Device opened!"
DUT_ss = StartShell(DUT)
DUT_ss.open()
print "got thru shell open."
print DUT_ss.run("pwd")
print DUT_ss.run("ls")
```


We never print the line "got thru shell open" because the library hangs while waiting for the "% " shell prompt to appear.  I have a fix i'll be suggesting. 

Discussion:

Patch:
diff --git a/lib/jnpr/junos/utils/start_shell.py b/lib/jnpr/junos/utils/start_shell.py
index b52c518a..1631ef63 100644
--- a/lib/jnpr/junos/utils/start_shell.py
+++ b/lib/jnpr/junos/utils/start_shell.py
@@ -3,7 +3,7 @@ from select import select
 import re
 
 _JUNOS_PROMPT = '> '
-_SHELL_PROMPT = '(%|#) '
+_SHELL_PROMPT = '(%|#)\s'
 _SELECT_WAIT = 0.1
 _RECVSZ = 1024
 


Test patch:
diff --git a/tests/unit/utils/test_start_shell.py b/tests/unit/utils/test_start_shell.py
index ee728b02..8a4fb59d 100644
--- a/tests/unit/utils/test_start_shell.py
+++ b/tests/unit/utils/test_start_shell.py
@@ -29,7 +29,7 @@ class TestStartShell(unittest.TestCase):
     def test_startshell_open_with_junos_term(self, mock_wait, mock_connect):
         mock_wait.return_value = ["user > "]
         self.shell.open()
-        mock_wait.assert_called_with('(%|#) ')
+        mock_wait.assert_called_with('(%|#)\s')
 
     @patch('paramiko.SSHClient')
     def test_startshell_close(self, mock_connect):