Ignore:
Timestamp:
09/08/16 07:32:45 (8 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The past, pending flights are retrieved (re #307)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/web.py

    r806 r809  
    9696                         const.AIRCRAFT_B738, const.AIRCRAFT_DH8D ]
    9797
     98    STATUS_BOOKED = 1
     99
     100    STATUS_REPORTED = 2
     101
     102    STATUS_ACCEPTED = 3
     103
     104    STATUS_REJECTED = 4
     105
    98106    @staticmethod
    99107    def getDateTime(date, time):
     
    137145        """Construct a booked flight with the given ID."""
    138146        self.id = id
     147
     148    @property
     149    def status(self):
     150        """Get the status of the flight.
     151
     152        For web-based flights this is always STATUS_BOOKED."""
     153        return BookedFlight.STATUS_BOOKED
    139154
    140155    def readFromWeb(self, f):
     
    769784            result.rank = loginResult[1]
    770785            result.password = password
    771             result.flights = client.getFlights()
     786            flights = client.getFlights()
     787            result.flights = flights[0]
     788            result.reportedFlights = flights[1]
     789            result.rejectedFlights = flights[2]
    772790            if result.rank=="STU":
    773791                reply = client.getEntryExamStatus()
Note: See TracChangeset for help on using the changeset viewer.