summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael E Brown <michael_e_brown@dell.com>2007-12-05 19:32:48 -0600
committerMichael E Brown <michael_e_brown@dell.com>2007-12-05 19:34:32 -0600
commitbf4d8bb591ebca08625a416ff02341a40ec2c5af (patch)
tree451b16b7677faaf65357982e30cbb18510c90c51
parent4cfaeea14108aea68c9dfdbe89215a1fdf710244 (diff)
downloadmock-bf4d8bb591ebca08625a416ff02341a40ec2c5af.tar.gz
mock-bf4d8bb591ebca08625a416ff02341a40ec2c5af.tar.xz
mock-bf4d8bb591ebca08625a416ff02341a40ec2c5af.zip
fix python logging module exception problem earlier so there isnt any path through that hits that bug.
-rwxr-xr-xpy/mock.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/py/mock.py b/py/mock.py
index 7426e56..08dd136 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -469,8 +469,12 @@ def main(ret):
if __name__ == '__main__':
+ # fix for python 2.4 logging module bug:
+ logging.raiseExceptions = 0
+
exitStatus = 0
killOrphans = 1
+
try:
# sneaky way to ensure that we get passed back parameter even if
# we hit an exception.
@@ -506,8 +510,6 @@ if __name__ == '__main__':
if killOrphans and retParams:
mock.util.orphansKill(retParams["chroot"].rootdir)
- # fix for python 2.4 logging module bug:
- logging.raiseExceptions = 0
logging.shutdown()
sys.exit(exitStatus)