Skip to content

Commit

Permalink
<fix> Fix #3
Browse files Browse the repository at this point in the history
Author:rapospectre@gmail.com

Change-Id: Ic9dfa7675d3784c2e434c72d2b2ca42cbd406c30
Desc: Fix #3
  • Loading branch information
zhangjianqi committed Jun 14, 2017
1 parent ef601c3 commit 21d8617
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wechat_sender/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def delay_send(self, content, time, title='', remind=DEFAULT_REMIND_TIME):
if isinstance(time, (datetime.datetime, datetime.date)):
time = time.strftime('%Y-%m-%d %H:%M:%S')
if isinstance(remind, datetime.timedelta):
remind = remind.seconds
remind = int(remind.total_seconds())
if not isinstance(remind, int):
raise ValueError
data = self._wrap_post_data(title=title, content=content, time=time, remind=remind)
Expand All @@ -116,7 +116,7 @@ def periodic_send(self, content, interval, title=''):
"""
url = '{0}periodic_message'.format(self.remote)
if isinstance(interval, datetime.timedelta):
interval = interval.seconds
interval = int(interval.total_seconds())
if not isinstance(interval, int):
raise ValueError
data = self._wrap_post_data(title=title, content=content, interval=interval)
Expand Down

0 comments on commit 21d8617

Please sign in to comment.