Commit 51a90756 authored by Fabio Pelosin's avatar Fabio Pelosin

[pod-list] avoid exception usage for control flow

parent 85827809
...@@ -38,10 +38,12 @@ module Pod ...@@ -38,10 +38,12 @@ module Pod
end end
def last_check_time def last_check_time
string = File.open(last_check_file, "rb").read if File.exists?(last_check_file)
Time.parse(string) string = File.open(last_check_file, "rb").read
rescue Time.parse(string)
Time.now - 60 * 60 * 24 * 15 else
Time.now - 60 * 60 * 24 * 15
end
end end
def new_sets_since(time) def new_sets_since(time)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment