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.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Cheetah/Utils/Misc.py b/Cheetah/Utils/Misc.py
index b9cd58a..a046f5f 100644
--- a/Cheetah/Utils/Misc.py
+++ b/Cheetah/Utils/Misc.py
@@ -5,12 +5,14 @@ import os # Used in mkdirsWithPyInitFile.
import sys # Used in die.
##################################################
-## MISCELLANEOUS FUNCTIONS
+# MISCELLANEOUS FUNCTIONS
+
def die(reason):
sys.stderr.write(reason + '\n')
sys.exit(1)
+
def useOrRaise(thing, errmsg=''):
"""Raise 'thing' if it's a subclass of Exception. Otherwise return it.
@@ -60,7 +62,7 @@ def mkdirsWithPyInitFiles(path):
if not os.path.exists(path):
os.mkdir(path)
init = os.path.join(path, "__init__.py")
- f = open(init, 'w') # Open and close to produce empty file.
+ f = open(init, 'w') # Open and close to produce empty file.
f.close()
# vim: shiftwidth=4 tabstop=4 expandtab