Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion autoload/leetcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
log.setLevel(logging.ERROR)

def enable_logging():
out_hdlr = logging.FileHandler('leetcode-vim.log')
out_hdlr = logging.FileHandler('/tmp/leetcode-vim.log')
out_hdlr.setFormatter(logging.Formatter('%(asctime)s %(message)s'))
out_hdlr.setLevel(logging.INFO)
log.addHandler(out_hdlr)
Expand Down Expand Up @@ -501,6 +501,8 @@ def get_submission(sid):
if res.status_code != 200:
_echoerr('cannot find the submission: ' + sid)
return None
# TODO: some error in this function.
return []

# we need to parse the data from the Javascript snippet
s = res.text
Expand Down
2 changes: 1 addition & 1 deletion autoload/leetcode.vim
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if thirdparty_dir not in sys.path:
sys.path.append(thirdparty_dir)

if int(vim.eval('g:leetcode_china')):
os.environ['LEETCODE_BASE_URL'] = 'https://leetcode-cn.com'
os.environ['LEETCODE_BASE_URL'] = 'https://leetcode.cn'
else:
os.environ['LEETCODE_BASE_URL'] = 'https://leetcode.com'

Expand Down