diff options
author | Steven Knight <knight@baldmt.com> | 2010-01-09 00:26:44 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2010-01-09 00:26:44 (GMT) |
commit | 4813198d77d101f9328875efca7324e8d9b800f6 (patch) | |
tree | 291a5300428ee997ed35baa727991fe72738ab56 | |
parent | dac3c4c3066a9b90489269b31c857b1736c8887b (diff) | |
download | SCons-4813198d77d101f9328875efca7324e8d9b800f6.zip SCons-4813198d77d101f9328875efca7324e8d9b800f6.tar.gz SCons-4813198d77d101f9328875efca7324e8d9b800f6.tar.bz2 |
Python 1.5 fix (no continue within a try:-except: block within a loop).
-rw-r--r-- | src/engine/SCons/Scanner/LaTeX.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/engine/SCons/Scanner/LaTeX.py b/src/engine/SCons/Scanner/LaTeX.py index 144d67b..17000a2 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] |