Mercurial > hg > martINI
changeset 12:4faed08eb8d8
py35
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 20 Feb 2017 14:34:18 -0800 |
parents | c77259f467a3 |
children | ce3f13718f6e |
files | martini/config.py martini/main.py martini/odict.py setup.py |
diffstat | 4 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/martini/config.py Tue Aug 23 18:17:11 2016 -0700 +++ b/martini/config.py Mon Feb 20 14:34:18 2017 -0800 @@ -27,7 +27,7 @@ if os.path.exists(resource): return file(resource) if sum([resource.startswith(http) - for http in 'http://', 'https://']): + for http in ('http://', 'https://')]): return urllib2.urlopen(resource) return StringIO(resource)
--- a/martini/main.py Tue Aug 23 18:17:11 2016 -0700 +++ b/martini/main.py Mon Feb 20 14:34:18 2017 -0800 @@ -57,7 +57,7 @@ def set(args=None): usage = "%s file1 [file2] [...] --section1 option1=value1 option2=value2 --section2 option3=value3" - + # process arguments if args is None: args = sys.argv[1:] @@ -65,8 +65,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
--- a/martini/odict.py Tue Aug 23 18:17:11 2016 -0700 +++ b/martini/odict.py Mon Feb 20 14:34:18 2017 -0800 @@ -611,7 +611,7 @@ TypeError: pop expected at most 2 arguments, got 3 """ if len(args) > 1: - raise TypeError, ('pop expected at most 2 arguments, got %s' % + raise TypeError('pop expected at most 2 arguments, got %s' % (len(args) + 1)) if key in self: val = self[key]