diff options
author | yenatch <yenatch@gmail.com> | 2013-12-20 00:43:30 -0500 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2013-12-21 00:37:35 -0500 |
commit | efe0b717ef21acde2d30fc7de580547738ca67d6 (patch) | |
tree | 524c63520cc852d4244a899ec08d5e39b517cec8 /pokemontools/preprocessor.py | |
parent | 973a78167b104479bb6c8c4c528ae914106b1b53 (diff) | |
parent | f0aaf3cd568c485af40690ce0f18a6cd456ed02e (diff) |
Merge remote-tracking branch 'kanzure/master' into battle-animations
Conflicts:
pokemontools/wram.py
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 5ac7724..e7de46d 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): """ |