summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-01-19 03:23:27 -0500
committerChris McDonough <chrism@plope.com>2012-01-19 03:23:27 -0500
commit520676451b8b89177ad95cfcaa3f90484f5a6a18 (patch)
tree09ac1c9fb803fc89a557eb7283452e526614232e
parent2446376ea694c49ac313a037a8a26233e0219469 (diff)
parent4ef8a99d3260d99fa5522a0d26f1e7c1487c0265 (diff)
downloadpyramid-520676451b8b89177ad95cfcaa3f90484f5a6a18.tar.gz
pyramid-520676451b8b89177ad95cfcaa3f90484f5a6a18.tar.bz2
pyramid-520676451b8b89177ad95cfcaa3f90484f5a6a18.zip
Merge branch 'master' into 1.3-branch
-rw-r--r--pyramid/fixers/fix_bfg_imports.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pyramid/fixers/fix_bfg_imports.py b/pyramid/fixers/fix_bfg_imports.py
index d9a4a6dfb..0046aad30 100644
--- a/pyramid/fixers/fix_bfg_imports.py
+++ b/pyramid/fixers/fix_bfg_imports.py
@@ -190,7 +190,9 @@ def fix_zcml(path):
for file in files:
if file.endswith('.zcml'):
absfile = os.path.join(root, file)
- text = open(absfile, 'rb').read()
+ f = open(absfile, 'rb')
+ text = f.read()
+ f.close()
newt = NS.sub('xmlns="http://pylonshq.com/pyramid"', text)
newt = INCLUDE_ATTR.sub('pyramid_zcml', newt)
newt = ATTR.sub(replace, newt)
@@ -199,7 +201,6 @@ def fix_zcml(path):
newf.write(newt)
newf.flush()
newf.close()
- text.close()
for dir in dirs:
if dir.startswith('.'):