def get_closing_rule_for_now(location, attr=None): obj = utils.get_closing_rule_for_now(location) if obj is False: return False if attr is not None: return getattr(obj[0], attr) return obj