changeset 5635:244737a44ec8

fix exception raising
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 08 Mar 2010 14:20:37 +0100
parents cc15366f7b74
children 61d77b5506a5
files MoinMoin/Page.py MoinMoin/script/old/migration/12_to_13_mig01.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Sun Mar 07 20:27:20 2010 +0100
+++ b/MoinMoin/Page.py	Mon Mar 08 14:20:37 2010 +0100
@@ -491,7 +491,7 @@
                 os.makedirs(dirname)
             except OSError, err:
                 if not os.path.exists(dirname):
-                    raise err
+                    raise
         return underlay, fullpath
 
     def getPagePath(self, *args, **kw):
--- a/MoinMoin/script/old/migration/12_to_13_mig01.py	Sun Mar 07 20:27:20 2010 +0100
+++ b/MoinMoin/script/old/migration/12_to_13_mig01.py	Mon Mar 08 14:20:37 2010 +0100
@@ -93,7 +93,7 @@
     print "%s -> %s" % (fname_from, fname_to)
     file_from = open(fname_from, "rb")
     if os.path.exists(fname_to):
-        raise "file exists %s" % fname_to
+        raise Exception("file exists %s" % fname_to)
     file_to = open(fname_to, "wb")
     for line in file_from:
         file_to.write(convert_string(line, enc_from, enc_to))