diff --git a/autoload/leetcode.py b/autoload/leetcode.py index 436c595..dec5a87 100644 --- a/autoload/leetcode.py +++ b/autoload/leetcode.py @@ -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) @@ -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 diff --git a/autoload/leetcode.vim b/autoload/leetcode.vim index bf303c8..710d766 100644 --- a/autoload/leetcode.vim +++ b/autoload/leetcode.vim @@ -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'