diff options
author | yenatch <yenatch@gmail.com> | 2013-11-05 14:11:04 -0500 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2013-11-05 14:11:04 -0500 |
commit | da7b863b8e20d5d8da07d9eb44e0fd4f5f0848d0 (patch) | |
tree | 09a02add28a0d34589fce85ec2fde3da81c8eb05 /pokemontools/preprocessor.py | |
parent | 4a7373d8e79d17f10ebafa3ccef7b822a5b139af (diff) | |
parent | dafb5518df768f93ac94c59d4bf5981e95f7aba0 (diff) |
Merge branch 'master' of github.com:kanzure/pokemon-reverse-engineering-tools
Diffstat (limited to 'pokemontools/preprocessor.py')
-rw-r--r-- | pokemontools/preprocessor.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/pokemontools/preprocessor.py b/pokemontools/preprocessor.py index 0cb7f48..5fe0851 100644 --- a/pokemontools/preprocessor.py +++ b/pokemontools/preprocessor.py @@ -489,12 +489,16 @@ class Preprocessor(object): """ Add any labels not already in globals.asm. """ - globes = open(os.path.join(self.config.path, 'globals.asm'), 'r+') - lines = globes.readlines() - for globe in self.globes: - line = 'GLOBAL ' + globe + '\n' - if line not in lines: - globes.write(line) + # TODO: pokered needs to be fixed + try: + globes = open(os.path.join(self.config.path, 'globals.asm'), '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): """ |