changeset 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 43db853df1f8
children a2bae4ae8eeb
files makeitso/makeitso.py makeitso/python.py setup.py
diffstat 3 files changed, 7 insertions(+), 5 deletions(-) [+]
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:
--- a/makeitso/python.py	Fri Mar 31 17:53:48 2017 -0700
+++ b/makeitso/python.py	Fri Mar 31 18:05:28 2017 -0700
@@ -78,7 +78,8 @@
 
     def post(self, variables, output):
         shutil.move(os.path.join(output, '{{main}}.py'),
-                    os.path.join(output, '{}.py'.format(variables['main']))
+                    os.path.join(output, '{}.py'.format(variables['main'])))
+
 
 class PythonPackageTemplate(PythonTemplate):
     """
--- a/setup.py	Fri Mar 31 17:53:48 2017 -0700
+++ b/setup.py	Fri Mar 31 18:05:28 2017 -0700
@@ -16,7 +16,7 @@
 except IOError:
     description = ''
 
-version = '0.4.3'
+version = '0.4.4'
 
 setup(name='MakeItSo',
       version=version,