From 9ad2529b371c118cf0b94eb2d7cde0cebe1e1611 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Sat, 9 Jan 2010 00:26:44 +0000 Subject: [PATCH] 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 --- src/engine/SCons/Scanner/LaTeX.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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] -- 2.26.2