aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2010-08-03 00:14:22 -0400
committerWaylan Limberg <waylan@gmail.com>2010-08-03 00:14:22 -0400
commit3bd36d4c8f0ca1f7345999a58d7b8c2f5e6f9fbe (patch)
treeb0d3c8e8c445bb51f8c039ffc33a90333f8653ac
parentf039ca04cccf0645a21cb0739c17e5f6abd593fb (diff)
downloadmarkdown-3bd36d4c8f0ca1f7345999a58d7b8c2f5e6f9fbe.tar.gz
markdown-3bd36d4c8f0ca1f7345999a58d7b8c2f5e6f9fbe.tar.bz2
markdown-3bd36d4c8f0ca1f7345999a58d7b8c2f5e6f9fbe.zip
Fixed ticket 69. Corrected a few syntax incompatabilities between python 2.x and 3.x in the setup script. Now the script actually can run 2to3 automaticaly when run under Python 3.x. Thanks for the report Virgil Dupras.
-rwxr-xr-xsetup.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index a0292eb..21249c3 100755
--- a/setup.py
+++ b/setup.py
@@ -34,9 +34,10 @@ class md_install_scripts(install_scripts):
f = file(bat_path, 'w')
f.write(bat_str)
f.close()
- print 'Created:', bat_path
- except Exception, e:
- print 'ERROR: Unable to create %s: %s' % (bat_path, e)
+ print ('Created: %s' % bat_path)
+ except Exception:
+ _, err, _ = sys.exc_info() # for both 2.x & 3.x compatability
+ print ('ERROR: Unable to create %s: %s' % (bat_path, err))
data = dict(
name = 'Markdown',