def footer(self): """Return parsed footer value""" self.close_zoom() cleaned = [ x.strip() for x in self.widget_view.footer.text.strip().split("|") ] result = {} for item in cleaned: name, time = item.split(" ", 1) time = time.strip() if time.lower() == "never": result[name.strip().lower()] = None else: try: result[name.strip().lower( )] = parsetime.from_american_minutes(time.strip()) except ValueError: result[name.strip().lower( )] = parsetime.from_long_date_format(time.strip()) return result
def footer(self): """Return parsed footer value""" self.close_zoom() cleaned = [ x.strip() for x in self.widget_view.footer.text.encode("utf-8").strip().split("|") ] result = {} for item in cleaned: name, time = item.split(" ", 1) time = time.strip() if time.lower() == "never": result[name.strip().lower()] = None else: try: result[name.strip().lower()] = parsetime.from_american_minutes(time.strip()) except ValueError: result[name.strip().lower()] = parsetime.from_long_date_format(time.strip()) return result