-#! /usr/bin/env python
+#!/usr/bin/env python3
import sys
command.prep()
if not command.opts.linkfile:
- print "Missing link list -- exiting"
+ print("Missing link list -- exiting")
command.parser.print_help()
sys.exit(1)
outfile = sys.stdout
ad_rspec = RSpec(infile)
links = open(command.opts.linkfile).read().split('\n')
-link_tuples = map(lambda x: tuple(x.split()), links)
+link_tuples = [tuple(x.split()) for x in links]
version_manager = VersionManager()
try:
except:
logger.log_exc("sfiAddLinks FAILED with links %s" % links)
sys.exit(1)
-print >>outfile, request_rspec.toxml()
+print(request_rspec.toxml(), file=outfile)
sys.exit(0)