Skip to content

Commit

Permalink
Check if a whitespaced-stripped version is empty
Browse files Browse the repository at this point in the history
Currently fetch_lines_from_error_log() checks if fetched == "", and since line 162 adds "    " to formatted_lines, fetched should never equal "". This makes fetch_lines_... check if a rstrip'd version of fetched is empty.
  • Loading branch information
csnardi committed Feb 25, 2015
1 parent 1c511b5 commit 95607ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datahandling.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def fetch_lines_from_error_log(line_count):
for line in lines:
formatted_lines.append(" " + line.rstrip())
fetched = os.linesep.join(formatted_lines)
if fetched == "":
if fetched.rstrip() == "":
return "The fetched part is empty. Please try another line count."
return fetched

Expand Down

0 comments on commit 95607ef

Please sign in to comment.