Mercurial > moin > 1.9
changeset 348:f308f9478d51
Fixed maketestwiki.py for cases when there is not testwiki dir, or when run on Windows (How i hate this WindowsError exception).
imported from: moin--main--1.5--patch-352
author | Alexander Schremmer <alex@alexanderweb.de.tla> |
---|---|
date | Fri, 30 Dec 2005 19:43:52 +0000 |
parents | db26c7fc0af0 |
children | b0527dd2174c |
files | tests/maketestwiki.py |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/maketestwiki.py Fri Dec 30 14:52:39 2005 +0000 +++ b/tests/maketestwiki.py Fri Dec 30 19:43:52 2005 +0000 @@ -24,7 +24,8 @@ try: shutil.rmtree(os.path.join(WIKI, dir)) except OSError, err: - if err.errno != errno.ENOENT: + if not (err.errno == errno.ENOENT or + (err.errno == 3 and os.name == 'nt')): raise def copyData(): @@ -48,7 +49,13 @@ tar.close() -def run(): +def run(): + try: + os.makedirs(WIKI) + except OSError, e: + if e.errno != errno.EEXIST: + raise + removeTestWiki() copyData() untarUnderlay()