[Checkins] SVN: zc.recipe.cmmi/trunk/zc/recipe/cmmi/__init__.py
Handle chdir to temporary directory correctly.
Jim Fulton
jim at zope.com
Wed Sep 6 18:32:09 EDT 2006
Log message for revision 70016:
Handle chdir to temporary directory correctly.
Changed:
U zc.recipe.cmmi/trunk/zc/recipe/cmmi/__init__.py
-=-
Modified: zc.recipe.cmmi/trunk/zc/recipe/cmmi/__init__.py
===================================================================
--- zc.recipe.cmmi/trunk/zc/recipe/cmmi/__init__.py 2006-09-06 19:08:37 UTC (rev 70015)
+++ zc.recipe.cmmi/trunk/zc/recipe/cmmi/__init__.py 2006-09-06 22:32:08 UTC (rev 70016)
@@ -34,18 +34,20 @@
here = os.getcwd()
try:
os.chdir(tmp)
- if not os.path.exists('configure'):
- entries = os.listdir(tmp)
- if len(entries) == 1:
- os.chdir(entries[0])
- else:
- raise ValueError("Couldn't find configure")
-
- system("./configure --prefix="+dest)
- system("make")
- system("make install")
+ try:
+ if not os.path.exists('configure'):
+ entries = os.listdir(tmp)
+ if len(entries) == 1:
+ os.chdir(entries[0])
+ else:
+ raise ValueError("Couldn't find configure")
+
+ system("./configure --prefix="+dest)
+ system("make")
+ system("make install")
+ finally:
+ os.chdir(here)
except:
- os.chdir(here)
os.rmdir(dest)
raise
More information about the Checkins
mailing list