From: stevenknight Date: Sat, 9 Jan 2010 00:26:44 +0000 (+0000) Subject: Python 1.5 fix (no continue within a try:-except: block within a loop). X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9ad2529b371c118cf0b94eb2d7cde0cebe1e1611;p=scons.git Python 1.5 fix (no continue within a try:-except: block within a loop). git-svn-id: http://scons.tigris.org/svn/scons/trunk@4598 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Scanner/LaTeX.py b/src/engine/SCons/Scanner/LaTeX.py index 144d67bd..17000a2c 100644 --- a/src/engine/SCons/Scanner/LaTeX.py +++ b/src/engine/SCons/Scanner/LaTeX.py @@ -336,11 +336,19 @@ class LaTeX(SCons.Scanner.Base): while queue: include = queue.pop() + # TODO(1.5): more compact: + #try: + # if seen[include[1]] == 1: + # continue + #except KeyError: + # seen[include[1]] = 1 try: - if seen[include[1]] == 1: - continue + already_seen = seen[include[1]] except KeyError: seen[include[1]] = 1 + already_seen = False + if already_seen: + continue # # Handle multiple filenames in include[1]