Skip to content

Commit

Permalink
fixed a uninitialized value exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
andyao1 authored and anutron committed Jun 5, 2011
1 parent c8e0504 commit 147de1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django/src/depender/core.py
Expand Up @@ -151,13 +151,16 @@ def strip_blocks(self):
//</1.2compat> //</1.2compat>
""" """
print_content = False
if self.exclude_blocks and len(self.exclude_blocks) > 0: if self.exclude_blocks and len(self.exclude_blocks) > 0:
for package_name, package in self.packages.items(): for package_name, package in self.packages.items():
for c, fd in package.components.iteritems(): for c, fd in package.components.iteritems():
for block in self.exclude_blocks: for block in self.exclude_blocks:
JS_BLOCKS = re.compile(r'/[/*]\s*<' + block + '>.+?<\/' + block + '>(?:\s*\*/)?(?s)', re.MULTILINE) JS_BLOCKS = re.compile(r'/[/*]\s*<' + block + '>.+?<\/' + block + '>(?:\s*\*/)?(?s)', re.MULTILINE)
fd.content = JS_BLOCKS.sub('/* compat block ' + block + ' removed */', fd.content) fd.content = JS_BLOCKS.sub('/* compat block ' + block + ' removed */', fd.content)
print fd.content print_content = True
if print_content:
print fd.content


def get(self, id): def get(self, id):
""" """
Expand Down

0 comments on commit 147de1f

Please sign in to comment.