def get_limits(self, limit_sum=None):
with self.limit_lock:<EOL><INDENT>if limit_sum and self.limit_sum == limit_sum:<EOL><INDENT>raise NoChangeException()<EOL><DEDENT>return (self.limit_sum, self.limit_data)<EOL><DEDENT>
Gets the current limit data if it is different from the data
indicated by limit_sum.  The db argument is used for hydrating
the limit objects.  Raises a NoChangeException if the
limit_sum represents no change, otherwise returns a tuple
consisting of the current limit_sum and a list of Limit
objects.