X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=clientbin%2FsfiAddSliver.py;h=93bb5005e6ff7977901e14b783f8a393d1de7ad3;hb=9ba5c613360d4d8e4ecae4da383819464a10d5fd;hp=84ffa8b0301e89b26f5cb848c42c08cabcecc16b;hpb=a0b08c3177b6273ad22f3882cd62495743ed404c;p=sfa.git diff --git a/clientbin/sfiAddSliver.py b/clientbin/sfiAddSliver.py index 84ffa8b0..93bb5005 100755 --- a/clientbin/sfiAddSliver.py +++ b/clientbin/sfiAddSliver.py @@ -19,22 +19,23 @@ if not command.opts.nodefile: print "Missing node list -- exiting" command.parser.print_help() sys.exit(1) - + if command.opts.infile: - infile=file(command.opts.infile) + infile = open(command.opts.infile) else: - infile=sys.stdin + infile = sys.stdin if command.opts.outfile: - outfile=file(command.opts.outfile,"w") + outfile = open(command.opts.outfile, "w") else: - outfile=sys.stdout + outfile = sys.stdout ad_rspec = RSpec(infile) -nodes = file(command.opts.nodefile).read().split() +nodes = open(command.opts.nodefile).read().split() version_manager = VersionManager() try: type = ad_rspec.version.type version_num = ad_rspec.version.version - request_version = version_manager._get_version(type, version_num, 'request') + request_version = version_manager._get_version( + type, version_num, 'request') request_rspec = RSpec(version=request_version) request_rspec.version.merge(ad_rspec) request_rspec.version.add_slivers(nodes)