[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r23284 - in gnunet-planetlab/gplmt: . gplmt
From: |
gnunet |
Subject: |
[GNUnet-SVN] r23284 - in gnunet-planetlab/gplmt: . gplmt |
Date: |
Fri, 17 Aug 2012 14:02:10 +0200 |
Author: wachs
Date: 2012-08-17 14:02:10 +0200 (Fri, 17 Aug 2012)
New Revision: 23284
Modified:
gnunet-planetlab/gplmt/gplmt.py
gnunet-planetlab/gplmt/gplmt/Tasks.py
gnunet-planetlab/gplmt/gplmt/Util.py
Log:
- fixes
Modified: gnunet-planetlab/gplmt/gplmt/Tasks.py
===================================================================
--- gnunet-planetlab/gplmt/gplmt/Tasks.py 2012-08-17 11:26:36 UTC (rev
23283)
+++ gnunet-planetlab/gplmt/gplmt/Tasks.py 2012-08-17 12:02:10 UTC (rev
23284)
@@ -22,7 +22,7 @@
#
# Nodes
try:
- from Util import handle_filename
+ import Util
import sys
import os
from xml.parsers import expat
@@ -154,7 +154,7 @@
for child in elem:
if ((child.tag == "command_file") and (child.text != None)):
- t.command_file = handle_filename(child.text)
+ t.command_file = Util.handle_filename(child.text)
if (False == os.path.exists(t.command_file)):
print "Command file '" ++ "' not existing"
sys.exit()
Modified: gnunet-planetlab/gplmt/gplmt/Util.py
===================================================================
--- gnunet-planetlab/gplmt/gplmt/Util.py 2012-08-17 11:26:36 UTC (rev
23283)
+++ gnunet-planetlab/gplmt/gplmt/Util.py 2012-08-17 12:02:10 UTC (rev
23284)
@@ -23,10 +23,9 @@
# Utilities
import os
-class Util:
- def handle_filename (self, f):
- f = os.path.expanduser(f)
- return f
+def handle_filename (f):
+ f = os.path.expanduser(f)
+ return f
class Logger:
Modified: gnunet-planetlab/gplmt/gplmt.py
===================================================================
--- gnunet-planetlab/gplmt/gplmt.py 2012-08-17 11:26:36 UTC (rev 23283)
+++ gnunet-planetlab/gplmt/gplmt.py 2012-08-17 12:02:10 UTC (rev 23284)
@@ -24,6 +24,7 @@
# Checking dependencies
# ElementTree XML Parser
+import sys
try:
from elementtree import ElementTree
elementtree_loaded = True
@@ -40,23 +41,20 @@
except ImportError:
minixsv_loaded = False
+
try:
- from Util import handle_filename
import gplmt.Util as Util
import gplmt.Configuration as Configuration
import gplmt.Nodes as Nodes
import gplmt.Tasks as Tasks
import gplmt.Worker as Worker
import gplmt.Notifications as Notifications
+ import getopt
- import getopt, sys
-except ImportError:
- print "That's a bug! please check README"
- sys.exit (1)
+except ImportError as e:
+ print "That's a bug! please check README: " + str (e)
+ imports = False
-
-
-
def main():
global main
main = Main ()
@@ -88,13 +86,13 @@
usage()
sys.exit()
elif o in ("-c", "--config"):
- main.config_file = handle_filename(a)
+ main.config_file = Util.handle_filename(a)
elif o in ("-H", "--host"):
main.single_host = a
elif o in ("-n", "--nodes"):
- main.nodes_file = handle_filename(a)
+ main.nodes_file = Util.handle_filename(a)
elif o in ("-t", "--tasks"):
- main.tasks_file = handle_filename(a)
+ main.tasks_file = Util.handle_filename(a)
elif o in ("-a", "--all"):
main.pl_use_nodes = True
elif o in ("-p", "--password"):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r23284 - in gnunet-planetlab/gplmt: . gplmt,
gnunet <=