# HG changeset patch # User Jeff Hammel # Date 1487630058 28800 # Node ID 4faed08eb8d8023d2d29ad7bfba7a702fd34ffbe # Parent c77259f467a30832e6caeab15624e163ce010c6c py35 diff -r c77259f467a3 -r 4faed08eb8d8 martini/config.py --- 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) diff -r c77259f467a3 -r 4faed08eb8d8 martini/main.py --- 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 diff -r c77259f467a3 -r 4faed08eb8d8 martini/odict.py --- 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] diff -r c77259f467a3 -r 4faed08eb8d8 setup.py --- a/setup.py Tue Aug 23 18:17:11 2016 -0700 +++ b/setup.py Mon Feb 20 14:34:18 2017 -0800 @@ -2,7 +2,7 @@ import sys, os try: - description = file('README.txt').read() + description = open('README.txt').read() except: description = ''