Skip to content

Commit

Permalink
path bug
Browse files Browse the repository at this point in the history
  • Loading branch information
taizilongxu committed Oct 11, 2014
1 parent 210a14d commit 6127202
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions douban/douban_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ def win_login(self):

def login(self):
"登陆douban.fm获取token"
if os.path.exists('.douban_token.txt'):
path = os.path.expanduser('~') + '/.douban_token.txt'
if os.path.exists(path):
# 已登陆
with open(os.path.expanduser('~') + '/.douban_token.txt', 'r') as f:
with open(path, 'r') as f:
self.login_data = pickle.load(f)
self.token = self.login_data['token']
self.user_name = self.login_data['user_name']
Expand Down

0 comments on commit 6127202

Please sign in to comment.