Fix fetching of custom series indices using book.get(...)

This commit is contained in:
Charles Haley 2010-12-29 08:38:58 +00:00
parent 3d102d6ad8
commit 6f718a4dc9

View File

@ -159,6 +159,11 @@ class Metadata(object):
try: try:
return self.__getattribute__(field) return self.__getattribute__(field)
except AttributeError: except AttributeError:
if field.startswith('#') and field.endswith('_index'):
try:
return self.get_extra(field[:-6])
except:
pass
return default return default
def get_extra(self, field): def get_extra(self, field):