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

[pod-list] avoid exception usage for control flow

parent 85827809
...@@ -38,11 +38,13 @@ module Pod ...@@ -38,11 +38,13 @@ module Pod
end end
def last_check_time def last_check_time
if File.exists?(last_check_file)
string = File.open(last_check_file, "rb").read string = File.open(last_check_file, "rb").read
Time.parse(string) Time.parse(string)
rescue else
Time.now - 60 * 60 * 24 * 15 Time.now - 60 * 60 * 24 * 15
end end
end
def new_sets_since(time) def new_sets_since(time)
all = Source.all_sets all = Source.all_sets
......
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