Skip to content

Commit

Permalink
Fix a few things that fail in Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
msabramo committed Apr 28, 2015
1 parent d4b9ea3 commit 370e822
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion SetupConfig.py
Expand Up @@ -29,7 +29,10 @@
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Software Development :: User Interfaces
Topic :: Text Processing'''.splitlines() if not line.strip().startswith('#')]
del line
try:
del line
except NameError:
pass

package_dir = {'Cheetah':'cheetah'}

Expand Down
6 changes: 3 additions & 3 deletions SetupTools.py
Expand Up @@ -47,13 +47,13 @@ class mod_build_ext(build_ext):
def run(self):
try:
build_ext.run(self)
except DistutilsPlatformError, x:
except DistutilsPlatformError as x:
raise BuildFailed(x)

def build_extension(self, ext):
try:
build_ext.build_extension(self, ext)
except ext_errors, x:
except ext_errors as x:
raise BuildFailed(x)


Expand Down Expand Up @@ -156,7 +156,7 @@ def run_setup(configurations):
# Invoke distutils setup
try:
setup(**kws)
except BuildFailed, x:
except BuildFailed as x:
print("One or more C extensions failed to build.")
print("Details: %s" % x)
if os.environ.get('CHEETAH_C_EXTENSIONS_REQUIRED'):
Expand Down
4 changes: 2 additions & 2 deletions cheetah/__init__.py
Expand Up @@ -13,8 +13,8 @@
Mailing list
cheetahtemplate-discuss@lists.sourceforge.net
Subscribe at
Subscribe at
http://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
'''

from Version import *
from .Version import *

0 comments on commit 370e822

Please sign in to comment.