Skip to content

Commit

Permalink
修复flask扩展bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zwczou committed Sep 1, 2016
1 parent dad5c45 commit 6d529d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
setup(
name='weixin-python',
description='Weixin for python',
long_description=open("README.md").read(),
license = 'BSD',
packages = find_packages(),
version='0.2.1',
version='0.2.2',
author='zwczou',
author_email='[email protected]',
url='https://github.com/zwczou/weixin-python',
Expand Down
6 changes: 2 additions & 4 deletions weixin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
class Weixin(object):

def __init__(self, app=None):
if app is None:
self.app = current_app
else:
if app is not None:
self.init_app(app)
self.app = app
self.init_app(self.app)

def init_app(self, app):
token = app.config.get("WEIXIN_TOKEN")
Expand Down
1 change: 1 addition & 0 deletions weixin/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def get(self, url, params):
if data.errcode:
msg = "%(errcode)d %(errmsg)s" % data
raise WeixinLoginError(msg)
return data

def authorize(self, redirect_uri, scope="snsapi_base", state=None):
"""
Expand Down

0 comments on commit 6d529d5

Please sign in to comment.