# HG changeset patch # User Jeff Hammel # Date 1619301536 25200 # Node ID 85bbb83703fabc874ddce9c3b9be18587ac16c93 # Parent 93c198d9bf843595aef4ed20edeca1402f56e782 python3 diff -r 93c198d9bf84 -r 85bbb83703fa martini/main.py --- a/martini/main.py Tue Nov 24 14:49:30 2020 -0800 +++ b/martini/main.py Sat Apr 24 14:58:56 2021 -0700 @@ -95,8 +95,8 @@ # display usage information if not files: - print 'Usage:' - print usage % os.path.basename(sys.argv[0]) + print('Usage:') + print(usage % os.path.basename(sys.argv[0])) sys.exit(0) # process the files @@ -112,7 +112,7 @@ for option in options: value = munger.get(section, option) if value is not None: - print value + print(value) else: config.ConfigMunger({section: munger[section]}).write() @@ -127,8 +127,8 @@ # display usage information if not files: - print 'Usage:' - print usage % os.path.basename(sys.argv[0]) + print('Usage:') + print(usage % os.path.basename(sys.argv[0])) sys.exit(0) # process the files @@ -150,7 +150,7 @@ fp = sys.stdout else: fp.close() - fp = file(f, 'w') + fp = open(f, 'w') config.ConfigMunger(conf).write(fp) def munge(args=None): @@ -169,12 +169,12 @@ # display usage information if not files: - print 'Usage:' - print usage % os.path.basename(sys.argv[0]) + print('Usage:') + print(usage % os.path.basename(sys.argv[0])) sys.exit(0) # munge the files - conf = list(files) + conf = list(files) conf.append(sections) munger = config.ConfigMunger(*conf) if options.output: