diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-12-18 20:20:09 -0600 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-12-18 20:20:09 -0600 |
commit | a07c92d3b38898568077da99ec05a82c69ffcc3c (patch) | |
tree | 44c5466fc998a132a358e319a01cd7c3dca954ed /pokemontools/preprocessor.py | |
parent | a077e470b2b24fc00db75aad220cc381f602bb3e (diff) | |
parent | d8f4e687ebc49d4b135f0d8b7f10a643114a0d8a (diff) |
Merge branch 'master' into path-finding
Diffstat (limited to 'pokemontools/preprocessor.py')
-rw-r--r-- | pokemontools/preprocessor.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/pokemontools/preprocessor.py b/pokemontools/preprocessor.py index f4e92b6..bde5f70 100644 --- a/pokemontools/preprocessor.py +++ b/pokemontools/preprocessor.py @@ -483,22 +483,18 @@ class Preprocessor(object): for l in lines: self.read_line(l) - self.update_globals() - def update_globals(self): """ Add any labels not already in globals.asm. """ - # TODO: pokered needs to be fixed - try: - globes = open(os.path.join(self.config.path, 'globals.asm'), 'r+') + path = os.path.join(self.config.path, 'globals.asm') + if os.path.exists(path): + globes = open(path, 'r+') lines = globes.readlines() for globe in self.globes: line = 'GLOBAL ' + globe + '\n' if line not in lines: globes.write(line) - except Exception as exception: - pass # don't care if it's not there... def read_line(self, l): """ |