gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r27168 - gnunet-planetlab/gplmt/gplmt


From: gnunet
Subject: [GNUnet-SVN] r27168 - gnunet-planetlab/gplmt/gplmt
Date: Thu, 16 May 2013 13:05:10 +0200

Author: wachs
Date: 2013-05-16 13:05:10 +0200 (Thu, 16 May 2013)
New Revision: 27168

Modified:
   gnunet-planetlab/gplmt/gplmt/Util.py
Log:
print ssh connection


Modified: gnunet-planetlab/gplmt/gplmt/Util.py
===================================================================
--- gnunet-planetlab/gplmt/gplmt/Util.py        2013-05-16 08:56:04 UTC (rev 
27167)
+++ gnunet-planetlab/gplmt/gplmt/Util.py        2013-05-16 11:05:10 UTC (rev 
27168)
@@ -27,6 +27,26 @@
     f = os.path.expanduser(f)         
     return f
 
+def print_ssh_connection (node):    
+    res = ""
+    cred = ""
+    if node.hostname != None:
+        res = node.hostname;
+    else:
+        return res;        
+    if node.port != None:
+        res += ":" + str(node.port);
+                
+    if node.username != None:
+        cred = node.username;
+    if node.password != None:
+        cred += ":" + node.password;
+    if "" != cred :
+        res = cred + "@" + res;
+
+
+    return res;
+
 class Logger:
 
     def __init__(self, verbose):
@@ -37,5 +57,4 @@
     def log (self, message):
         global main
         if (True == self.verbose):
-            print (message)
-        
\ No newline at end of file
+            print (message)
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]