From 9a3a96a31fc38e9781b512b172fc87c723867ec1 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Thu, 3 Jan 2008 00:57:36 +0000 Subject: [PATCH] py2.4 fix - thresh --- plugins/WebUi/scripts/extract_template_strings.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/WebUi/scripts/extract_template_strings.py b/plugins/WebUi/scripts/extract_template_strings.py index b1a894b31..f9ecc3dbb 100644 --- a/plugins/WebUi/scripts/extract_template_strings.py +++ b/plugins/WebUi/scripts/extract_template_strings.py @@ -16,14 +16,14 @@ for template_dir in template_dirs: all_strings = [] for filename in files: - with open(filename,'r') as f: - content = f.read() - all_strings += re.findall("_\(\"(.*?)\"\)",content) - all_strings += re.findall("_\(\'(.*?)\'\)",content) + f = open(filename,'r') + content = f.read() + all_strings += re.findall("_\(\"(.*?)\"\)",content) + all_strings += re.findall("_\(\'(.*?)\'\)",content) all_strings = sorted(set(all_strings)) -with open ('./template_strings.py','w') as f: - for value in all_strings: - f.write("_('%s')\n" % value ) +f = open ('./template_strings.py','w') +for value in all_strings: + f.write("_('%s')\n" % value )