Skip to content

Commit

Permalink
fix: parsing the raw before/after as param
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed May 6, 2024
1 parent d9bb1b9 commit 29b25e2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions slack_cleaner2/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

from .logger import SlackLogger


JSONDict = Dict[str, Any]
TimeIsh = Union[None, int, str, float]

Expand Down Expand Up @@ -251,7 +250,7 @@ def msgs(self, after: TimeIsh = None, before: TimeIsh = None, asc=False, with_re
yield s_msg

if with_replies and s_msg.has_replies:
yield from self.replies_to(s_msg, after=after_time, before=before_time, asc=asc)
yield from self.replies_to(s_msg, after=after, before=before, asc=asc)

def replies_to(self, base_msg: "SlackMessage", after: TimeIsh = None, before: TimeIsh = None, asc=False) -> Iterator["SlackMessage"]:
"""
Expand Down Expand Up @@ -900,7 +899,7 @@ def _parse_time(time_str: TimeIsh, log: SlackLogger) -> Optional[str]:
sec = time.mktime(time_d)
return str(int(round(sec)))
except ValueError:
log.exception("error parsing date %s", time_str)
log.exception("error parsing date %s (%s)", time_str, type(time_str))
return None


Expand Down

0 comments on commit 29b25e2

Please sign in to comment.