Adopt PEP-8 Style convention
This commit is contained in:
parent
daa27da3ce
commit
2d2b26b311
1 changed files with 14 additions and 9 deletions
|
|
@ -21,10 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
from weboob.capabilities.travel import ICapTravel
|
from weboob.capabilities.travel import ICapTravel
|
||||||
from weboob.tools.application import BaseApplication
|
from weboob.tools.application import BaseApplication
|
||||||
|
|
||||||
try:
|
import hildon
|
||||||
import hildon
|
|
||||||
except ImportError:
|
|
||||||
raise ImportError("Unable to import hildon http://maemo.org/packages/view/python-hildon/")
|
|
||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
|
|
||||||
|
|
@ -86,7 +83,6 @@ class TransilienUI():
|
||||||
|
|
||||||
liste = []
|
liste = []
|
||||||
|
|
||||||
#liste = ConfFile('/opt/masstransit/masstransit.cfg').config.items('ListeDesGares')
|
|
||||||
for backend in self.weboob.iter_backends():
|
for backend in self.weboob.iter_backends():
|
||||||
for station in backend.iter_station_search(""):
|
for station in backend.iter_station_search(""):
|
||||||
liste.append(station)
|
liste.append(station)
|
||||||
|
|
@ -142,16 +138,25 @@ class TransilienUI():
|
||||||
"update departures"
|
"update departures"
|
||||||
self.treestore.clear()
|
self.treestore.clear()
|
||||||
for backend in self.weboob.iter_backends():
|
for backend in self.weboob.iter_backends():
|
||||||
for station in backend.iter_station_search(self.combo_source.get_current_text()):
|
for station in \
|
||||||
for arrival in backend.iter_station_search(self.combo_dest.get_current_text()):
|
backend.iter_station_search(self.combo_source.get_current_text()):
|
||||||
for departure in backend.iter_station_departures(station.id, arrival.id):
|
for arrival in \
|
||||||
self.treestore.append(None, [departure.type, departure.time, departure.arrival_station, departure.information])
|
backend.iter_station_search(self.combo_dest.get_current_text()):
|
||||||
|
for departure in \
|
||||||
|
backend.iter_station_departures(station.id, arrival.id):
|
||||||
|
self.treestore.append(None,
|
||||||
|
[departure.type,
|
||||||
|
departure.time,
|
||||||
|
departure.arrival_station,
|
||||||
|
departure.information])
|
||||||
|
|
||||||
|
|
||||||
class Travel(BaseApplication):
|
class Travel(BaseApplication):
|
||||||
|
"Application Class"
|
||||||
APPNAME = 'travel'
|
APPNAME = 'travel'
|
||||||
|
|
||||||
def main(self, argv):
|
def main(self, argv):
|
||||||
|
"main fonction"
|
||||||
self.weboob.load_modules(ICapTravel)
|
self.weboob.load_modules(ICapTravel)
|
||||||
TransilienUI(self.weboob)
|
TransilienUI(self.weboob)
|
||||||
gtk.main()
|
gtk.main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue