Remove trailing whitespace (no code changes)
[pywienerlinien] / gotovienna / realtime.py
index ab4ba41..9565fd3 100644 (file)
@@ -18,22 +18,22 @@ class ITipParser:
         """
         if not self._stations.has_key(name):
             st = {}
-            
+
             if not self.lines.has_key(name):
                 return None
-            
+
             bs = BeautifulSoup(urlopen(self.lines[name]))
             tables = bs.findAll('table', {'class': 'text_10pix'})
             for i in range(2):
                 dir = tables[i].div.contents[-1].strip(' ')
-                
+
                 sta = []
                 for tr in tables[i].findAll('tr', {'onmouseout': 'obj_unhighlight(this);'}):
                     if tr.a:
                         sta.append((tr.a.text, settings.line_overview + tr.a['href']))
                     else:
                         sta.append((tr.text.strip(' '), None))
-                    
+
                 st[dir] = sta
             self._stations[name] = st
 
@@ -47,7 +47,7 @@ class ITipParser:
             bs = BeautifulSoup(urlopen(settings.line_overview))
             # get tables
             lines = bs.findAll('td', {'class': 'linie'})
-            
+
             for line in lines:
                 if line.a:
                     href = settings.line_overview + line.a['href']
@@ -55,7 +55,7 @@ class ITipParser:
                         self._lines[line.text] = href
                     elif line.img:
                         self._lines[line.img['alt']] = href
-                        
+
         return self._lines
 
     def get_departures(self, url):
@@ -63,16 +63,16 @@ class ITipParser:
         integer if time until next departure
         time if time of next departure
         """
-        
+
         #TODO parse line name and direction for station site parsing
-        
+
         if not url:
             # FIXME prevent from calling this method with None
             return []
 
         bs = BeautifulSoup(urlopen(url))
         result_lines = bs.findAll('table')[-1].findAll('tr')
-        
+
         dep = []
         for tr in result_lines[1:]:
             th = tr.findAll('th')
@@ -80,15 +80,15 @@ class ITipParser:
                 #TODO replace with logger
                 print "[DEBUG] Unable to find th in:\n%s" % str(tr)
                 continue
-            
+
             # parse time
             time = th[-2].text.split(' ')
             if len(time) < 2:
                 print 'Invalid time: %s' % time
                 continue
-            
+
             time = time[1]
-            
+
             if time.find('rze...') >= 0:
                     dep.append(0)
             elif time.isdigit():
@@ -104,6 +104,6 @@ class ITipParser:
                     # Unexpected content
                     #TODO replace with logger
                     print "[DEBUG] Invalid data:\n%s" % time
-                
+
         return dep