Python 1.5 fix (no continue within a try:-except: block within a loop).
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 9 Jan 2010 00:26:44 +0000 (00:26 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 9 Jan 2010 00:26:44 +0000 (00:26 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@4598 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Scanner/LaTeX.py

index 144d67bda1456bbc994d47326c94e72f297b4750..17000a2c25ea3fae43bc3cd5c531157c3c025f68 100644 (file)
@@ -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]