diff options
author | Hyunjee Kim <hj0426.kim@samsung.com> | 2020-04-09 15:43:33 +0900 |
---|---|---|
committer | Hyunjee Kim <hj0426.kim@samsung.com> | 2020-04-09 15:43:40 +0900 |
commit | 76bf43de2d74e5aa9a052cb82c0eab0f907f729c (patch) | |
tree | c933ea71b686e2586181bf785b31960847295989 /Cheetah/Utils/Misc.py | |
parent | 3e76493f8b26059c70479ae27bd25f30c8fe1330 (diff) | |
download | python3-Cheetah-76bf43de2d74e5aa9a052cb82c0eab0f907f729c.tar.gz python3-Cheetah-76bf43de2d74e5aa9a052cb82c0eab0f907f729c.tar.bz2 python3-Cheetah-76bf43de2d74e5aa9a052cb82c0eab0f907f729c.zip |
Imported Upstream version 3.1.0upstream/3.1.0
Change-Id: I6d46900bf9692994b595fe5b47bcd1ab9ef8a582
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
Diffstat (limited to 'Cheetah/Utils/Misc.py')
-rw-r--r-- | Cheetah/Utils/Misc.py | 6 |
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 |