[Compactpath-commit] SF.net SVN: compactpath: [12] trunk/src/compactpath/scripts/gen_docs.py
Status: Beta
Brought to you by:
jurner
|
From: <ju...@us...> - 2008-06-18 07:49:04
|
Revision: 12
http://compactpath.svn.sourceforge.net/compactpath/?rev=12&view=rev
Author: jurner
Date: 2008-06-18 00:48:57 -0700 (Wed, 18 Jun 2008)
Log Message:
-----------
removed with statement for compat
Modified Paths:
--------------
trunk/src/compactpath/scripts/gen_docs.py
Modified: trunk/src/compactpath/scripts/gen_docs.py
===================================================================
--- trunk/src/compactpath/scripts/gen_docs.py 2008-06-18 07:47:56 UTC (rev 11)
+++ trunk/src/compactpath/scripts/gen_docs.py 2008-06-18 07:48:57 UTC (rev 12)
@@ -6,11 +6,8 @@
@note: Use gen_docs.py -? or --help to print out this help text
@requires: epydoc
-@requires: python >= 2.4
"""
-from __future__ import with_statement
-
import sys, os
from epydoc import cli
import subprocess
@@ -54,13 +51,16 @@
# create a redirect to 'epydoc/index.html'
print 'creating redirect'
- with open(os.path.join(DOC_DIR, 'index.html'), 'w') as fp:
+ fp = open(os.path.join(DOC_DIR, 'index.html'), 'w')
+ try:
fp.write('''<html>
<head>
<meta http-equiv="Refresh" content="0; URL=%s">
</head>
</html>
''' % (EPYDOC_FOLDER + '/' + 'index.html') )
+ finally:
+ fp.close()
print 'done'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|