[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24804 - gnunet-planetlab/gplmt
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24804 - gnunet-planetlab/gplmt |
Date: |
Tue, 6 Nov 2012 14:44:53 +0100 |
Author: wachs
Date: 2012-11-06 14:44:53 +0100 (Tue, 06 Nov 2012)
New Revision: 24804
Modified:
gnunet-planetlab/gplmt/gplmt.py
Log:
return codes and password prompting
Modified: gnunet-planetlab/gplmt/gplmt.py
===================================================================
--- gnunet-planetlab/gplmt/gplmt.py 2012-11-06 13:16:16 UTC (rev 24803)
+++ gnunet-planetlab/gplmt/gplmt.py 2012-11-06 13:44:53 UTC (rev 24804)
@@ -59,6 +59,9 @@
global main
main = Main ()
+# Init
+ main.pl_password = None
+
# Check dependencies
if (False == elementtree_loaded):
print "ElementTree XML parsing module is required for execution,
please check README"
@@ -110,7 +113,7 @@
if (main.config_file == ""):
print "No configuration file given!\n"
usage()
- sys.exit(2)
+ sys.exit(1)
# Load configuration file
configuration = Configuration.Configuration (main.config_file,
main.logger);
@@ -124,7 +127,7 @@
else:
print "No nodes file given!\n"
usage()
- sys.exit(2)
+ sys.exit(3)
if (main.tasks_file == ""):
if (configuration.taskfile != ""):
@@ -132,26 +135,33 @@
else:
print "No tasks file given!\n"
usage()
- sys.exit(2)
- if (main.pl_password != ""):
+ sys.exit(4)
+
+ if ((True == main.pl_use_nodes) and (main.pl_password != None)):
configuration.pl_password = main.pl_password
+ if ((True == main.pl_use_nodes) and (main.pl_password == None)):
+ while ((main.pl_password == None) or (main.pl_password == "")):
+ print "Please enter PlanetLab password:"
+ main.pl_password = sys.stdin.readline()
+ main.pl_password = main.pl_password.strip()
+ configuration.pl_password = main.pl_password
# Load hosts files
if (main.single_host != None):
nodes = Nodes.StringNodes (main.single_host, main.logger)
if (nodes.load() == False):
- sys.exit(2)
+ sys.exit(5)
elif ((main.pl_use_nodes == True) or (configuration.pl_use_nodes == True)):
nodes = Nodes.PlanetLabNodes (configuration, main.logger)
if (nodes.load() == False):
- sys.exit(2)
+ sys.exit(6)
elif (main.nodes_file != ""):
nodes = Nodes.Nodes (main.nodes_file, main.logger);
if (nodes.load() == False):
- sys.exit(2)
+ sys.exit(7)
else:
print "No nodes file given!\n"
- sys.exit(2)
+ sys.exit(8)
# Load actions file
tasks = Tasks.Tasks (main.tasks_file, main.logger, main.startid);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24804 - gnunet-planetlab/gplmt,
gnunet <=