def __call__(self, books_needed):
'''Look up the appropriate routine or throw an error'''
self.LCEobj.errno = errno.ENOSYS
try:
policy_func = self.__class__.__dict__['_policy_' + self.name]
return policy_func(self, books_needed)
except KeyError as e:
# AssertionError is a "gentler" reporting path back to user
raise AssertionError('"%s" is not implemented' % self.name)
###########################################################################
# This is NOT for testing, just a quick entry without the full Librarian.
评论列表
文章目录