Mercurial > hg > MakeItSo
diff makeitso/makeitso.py @ 248:407dd46857e1
fix syntax error in python.py + version bump
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Fri, 31 Mar 2017 18:05:28 -0700 |
parents | fa496c9e9d73 |
children | f10f5beb8ad1 |
line wrap: on
line diff
--- a/makeitso/makeitso.py Fri Mar 31 17:53:48 2017 -0700 +++ b/makeitso/makeitso.py Fri Mar 31 18:05:28 2017 -0700 @@ -52,8 +52,8 @@ f, headers = urllib.urlretrive('%s/%s' % (url, filename)) content = file(f).read() outfile = os.path.join(globals()['tempdir'], subdir, filename) - o = file(outfile, 'w') - print >> o, content + with file(outfile, 'w') as o: + o.write(content) return globals()['tempdir'] tempita_files = ['__init__.py', '_looper.py', 'compat3.py'] @@ -84,6 +84,7 @@ def basename(uri): """return the basename of a URI""" + if '://' in uri: return uri.rsplit('/', 1)[1] else: @@ -530,7 +531,7 @@ # get templates from pkg_resources # (MakeItSo! and [TODO] pastescript templates) -# this should go last to ensure the module is wholly loaded [?] +# this should go last to ensure the module is wholly loaded [?!] def get_entry_points(): retval = {} try: