Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Small bit of error handling

  • Loading branch information...
commit 63474c0fc5b667ef771070cb633fc1f5a5d9650c 1 parent 7e948bd
@suttree authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  traintimes.rb
View
1  traintimes.rb
@@ -52,6 +52,7 @@
page_content = page.read()
soup = BeautifulSoup.new(page_content)
result = soup.find('a', :attrs => {'class' => 'status'}).parent
+ result = [] if result.nil?
result.each do |tag|
tag = tag.to_s
if tag.include?(time[0].to_s)
Please sign in to comment.
Something went wrong with that request. Please try again.