Skip to content

Commit

Permalink
Merge pull request #2 from williamzhanggg/master
Browse files Browse the repository at this point in the history
以utf-8读取配置文件
  • Loading branch information
shellvon committed May 9, 2018
2 parents 7178621 + 0164d1c commit 05b354b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/miaodi.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class MiaodiPlugin(SmsPlugin):

@property
def curtime(self):
return time.strftime('%Y%M%d%H%m%s')
return time.strftime('%Y%m%d%H%M%S')

def checksum(self, ts):
plain_text = '{sid}{token}{ts}'.format(
Expand Down
2 changes: 1 addition & 1 deletion smsBomb.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def load_config(cfg, product=None):
:type product: str
:return:
"""
with open(cfg, 'r') as config_file:
with open(cfg, 'r', encoding='utf8') as config_file:
config = json.loads(config_file.read())
if product:
return list(filter(lambda x: x['product'] == product, config))
Expand Down

0 comments on commit 05b354b

Please sign in to comment.