summaryrefslogtreecommitdiff
path: root/cheetah/Utils/Misc.py
diff options
context:
space:
mode:
Diffstat (limited to 'cheetah/Utils/Misc.py')
-rw-r--r--cheetah/Utils/Misc.py22
1 files changed, 4 insertions, 18 deletions
diff --git a/cheetah/Utils/Misc.py b/cheetah/Utils/Misc.py
index 6ff5bb2..81949d1 100644
--- a/cheetah/Utils/Misc.py
+++ b/cheetah/Utils/Misc.py
@@ -1,20 +1,8 @@
-# $Id: Misc.py,v 1.8 2005/11/02 22:26:08 tavis_rudd Exp $
-"""Miscellaneous functions/objects used by Cheetah but also useful standalone.
-
-Meta-Data
-================================================================================
-Author: Mike Orr <iron@mso.oz.net>
-License: This software is released for unlimited distribution under the
- terms of the MIT license. See the LICENSE file.
-Version: $Revision: 1.8 $
-Start Date: 2001/11/07
-Last Revision Date: $Date: 2005/11/02 22:26:08 $
+#!/usr/bin/env python
+"""
+ Miscellaneous functions/objects used by Cheetah but also useful standalone.
"""
-__author__ = "Mike Orr <iron@mso.oz.net>"
-__revision__ = "$Revision: 1.8 $"[11:-2]
-
import os # Used in mkdirsWithPyInitFile.
-import types # Used in useOrRaise.
import sys # Used in die.
##################################################
@@ -29,7 +17,7 @@ def useOrRaise(thing, errmsg=''):
Called by: Cheetah.Servlet.cgiImport()
"""
- if type(thing) == types.ClassType and issubclass(thing, Exception):
+ if isinstance(thing, type) and issubclass(thing, Exception):
raise thing(errmsg)
return thing
@@ -76,6 +64,4 @@ def mkdirsWithPyInitFiles(path):
f = open(init, 'w') # Open and close to produce empty file.
f.close()
-
-
# vim: shiftwidth=4 tabstop=4 expandtab