Urgh, I broked it

Tue, 07 May 2013 22:05:54 +0200

author
Andy Buckley <andy@insectnation.org>
date
Tue, 07 May 2013 22:05:54 +0200
changeset 220
51b25ede6f70
parent 219
99ab72d8a77e
child 221
4f6ce5c1904d

Urgh, I broked it

pyslha.py file | annotate | diff | comparison | revisions
     1.1 --- a/pyslha.py	Tue May 07 22:01:19 2013 +0200
     1.2 +++ b/pyslha.py	Tue May 07 22:05:54 2013 +0200
     1.3 @@ -204,8 +204,10 @@
     1.4                  raise AccessError("No valid integer indices found when setting a multi-index/multi-value block entry")
     1.5              elif i_first_nonint == 1:
     1.6                  self.entries[args[0]] = args[1:]
     1.7 +            elif i_first_nonint == len(args)-1:
     1.8 +                self.entries[tuple(args[:-1])] = args[-1]
     1.9              else:
    1.10 -                self.entries[tuple(args[:i_first_nonint])] = entry[i_first_nonint:]
    1.11 +                self.entries[tuple(args[:i_first_nonint])] = args[i_first_nonint:]
    1.12  
    1.13      def has_key(self, key):
    1.14          """Does the block have the given key?"""

mercurial