self.sshc.connect(hostname=hostname, username=username, port=port)
stdin, stdout, stderr = self.sshc.exec_command(comm)
print stdout.readlines()
- except Exception as e:
+ except Exception, e:
print e
finally:
self.sshc.close()
self.sshc.connect(hostname=hostname, username=username, port=port)
for c in comms:
stdin, stdout, stderr = self.sshc.exec_command(comm)
- except Exception as e:
+ except Exception, e:
print e
finally:
self.sshc.close()
self.sendMsg(pickle.dumps(config_data))
response = self.recvMsg()
print "->>>>>>>>>>>>>>>>>>>>>>>>>", response
- except Exception as e:
+ except Exception, e:
print e
finally:
self.sock.close()
self.sshclient.connect(hostname=self.hostname, username=self.username, pkey=self.pkey, port=self.port)
#self.channel = self.sshclient.opensession();
#self.sshclient.connect(username=self.username, pkey=self.pkey)
- except Exception as e:
+ except Exception, e:
print e
self.sshclient.close()
#self.channel = self.sshclient.open_session();
stdin, stdout, stderr = self.sshclient.exec_command(comm)
print stdout.readlines()
- except Exception as e:
+ except Exception, e:
print e
self.sshclient.close()
client_paths [client_id]=elem2[0].text;
list.append(client_paths);
self.nodes.append(Node(id, list))
- except IOError as e:
+ except IOError, e:
print e
return None
id = elem.get("id")
list = [elem2.text for elem2 in elem[:len(elem)-1]]
self.swarm.append(SwarmInstance(id, list))
- except IOError as e:
+ except IOError, e:
print e
return None