Currently, 'is_connected' attribute in SshServer is refered before it is created, in Python 2.7. This raises an Exception and the SSH operation won't work anymore after this happens. This commit ensures that 'is_connected' is created before it is refered.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimo...@gmail.com> --- ryu/services/protocols/bgp/operator/ssh.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ryu/services/protocols/bgp/operator/ssh.py b/ryu/services/protocols/bgp/operator/ssh.py index c228a89..ff6cc0e 100644 --- a/ryu/services/protocols/bgp/operator/ssh.py +++ b/ryu/services/protocols/bgp/operator/ssh.py @@ -382,6 +382,7 @@ class SshServer(paramiko.ServerInterface): self.prompted = True self.chan.send(self.WELCOME) self._startnewline() + self.is_connected = True while self.is_connected: c = self.chan.recv(1) -- 2.7.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel