Changeset 858:1f655516b7ae for src/mlx/web.py
- Timestamp:
- 06/08/17 18:36:07 (7 years ago)
- Branch:
- default
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/web.py
r854 r858 813 813 result.pilotName = loginResult[0] 814 814 result.rank = loginResult[1] 815 result.types = loginResult[2] 815 816 result.password = password 816 817 flights = client.getFlights() … … 825 826 if reply[3]: 826 827 result.rank = "FO" 828 827 829 828 830 def __init__(self, client, callback, pilotID, password): … … 1342 1344 #------------------------------------------------------------------------------ 1343 1345 1346 class GetTimetable(RPCRequest): 1347 """Request to get the timetable.""" 1348 def __init__(self, client, callback, date, types): 1349 """Construct the request with the given client and callback function.""" 1350 super(GetTimetable, self).__init__(client, callback) 1351 self._date = date 1352 self._types = types 1353 1354 def run(self): 1355 """Perform the login request.""" 1356 result = Result() 1357 1358 result.flightPairs = self._client.getTimetable(self._date, self._types) 1359 1360 return result 1361 1362 #------------------------------------------------------------------------------ 1363 1344 1364 class Handler(threading.Thread): 1345 1365 """The handler for the web services. … … 1439 1459 self._addRequest(GetAcceptedFlights(self._rpcClient, callback)) 1440 1460 1461 def getTimetable(self, callback, date, types): 1462 """Enqueue a request to get the timetable.""" 1463 self._addRequest(GetTimetable(self._rpcClient, callback, date, types)) 1464 1441 1465 def run(self): 1442 1466 """Process the requests."""
Note:
See TracChangeset
for help on using the changeset viewer.