From 2e0922788f4f3d34e8fe56fcdf140e59299c730c Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Wed, 16 Feb 2011 23:00:29 +0000 Subject: Rename inline functions to satisfy pyflakes. --- jarmonbuild/commands.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jarmonbuild/commands.py b/jarmonbuild/commands.py index 13958fb..0be6cf0 100644 --- a/jarmonbuild/commands.py +++ b/jarmonbuild/commands.py @@ -90,12 +90,14 @@ class BuildApidocsCommand(BuildCommand): if os.path.exists(yuizip_path): self.log.debug('Using cached YUI doc') - def producer(): + def producer_local(): yield open(yuizip_path).read() + + producer = producer_local else: self.log.debug('Downloading YUI Doc') - def producer(): + def producer_remote(): with open(yuizip_path, 'w') as yuizip: download = urlopen(YUIDOC_URL) while True: @@ -106,6 +108,8 @@ class BuildApidocsCommand(BuildCommand): yuizip.write(bytes) yield bytes + producer = producer_remote + checksum = hashlib.md5() for bytes in producer(): checksum.update(bytes) -- cgit v1.2.3