donnemartin / haxor-news

Browse Hacker News like a haxor: A Hacker News command line interface (CLI).
Other
3.98k stars 165 forks source link

Fix _safe_split function #152

Open cyblue9 opened 6 years ago

cyblue9 commented 6 years ago

Fixed return value of _safe_split function.

_safe_split function return value is list type, but If an exception occurs, str type is returned. At that time, get_completions() -> completing_subcommand_option() -> return [](in https://github.com/donnemartin/haxor-news/blob/master/haxor_news/completer.py 184 line). This is the same as to return [] in completer.py 172 line. So, If an exception occurs, [] is returned in _safe_split, the behavior does not change!

Please confirm!

codecov-io commented 6 years ago

Codecov Report

Merging #152 into master will not change coverage. The diff coverage is 0%.

@@           Coverage Diff           @@
##           master     #152   +/-   ##
=======================================
  Coverage   93.53%   93.53%           
=======================================
  Files          31       31           
  Lines        1469     1469           
=======================================
  Hits         1374     1374           
  Misses         95       95