From 4a28a9d7da98a70ef2f786c2330c734252b5a5d7 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 4 Jun 2018 15:08:04 -0400 Subject: Minor tweak to map2link.py --- tools/map2link.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/map2link.py b/tools/map2link.py index b24c82f..109dfa1 100644 --- a/tools/map2link.py +++ b/tools/map2link.py @@ -36,10 +36,11 @@ class MapFile: self.bankno = 0 else: self.bankno = int(match.group(1)) + bankname = linestr.split()[0].rstrip(':') try: - self.banktype = MapFile.bank_types.index(linestr.split()[0].rstrip(':')) + self.banktype = MapFile.bank_types.index(bankname) except ValueError as e: - raise ValueError(f'Unrecognized bank type: {linestr.split()[0]}') from e + raise ValueError(f'Unrecognized bank type: {bankname}') from e @property def name(self): -- cgit v1.2.3