Changeset 771:76aae72ccaba
- Timestamp:
- 05/06/16 18:10:55 (9 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r769 r771 1364 1364 if registrationOK: 1365 1365 if result.loggedIn: 1366 self._wizard._loginResult = result 1366 1367 self._wizard.nextPage() 1367 1368 else: -
src/mlx/web.py
r769 r771 678 678 679 679 self._client.setCredentials(pilotID, registrationData.password) 680 loginResult = self._client.login()681 result.loggedIn = loginResult is not None680 LoginRPC.setupLoginResult(result, self._client, pilotID, 681 registrationData.password) 682 682 683 683 result.invalidData = \ … … 750 750 class LoginRPC(RPCRequest): 751 751 """An RPC-based login request.""" 752 def __init__(self, client, callback, pilotID, password): 753 """Construct the login request with the given pilot ID and 752 @staticmethod 753 def setupLoginResult(result, client, pilotID, password): 754 """Setup the login result with the given client, pilot ID and 754 755 password.""" 755 super(LoginRPC, self).__init__(client, callback) 756 757 self._pilotID = pilotID 758 self._password = password 759 760 def run(self): 761 """Perform the login request.""" 762 result = Result() 763 764 self._client.setCredentials(self._pilotID, self._password) 765 loginResult = self._client.login() 756 loginResult = client.login() 766 757 result.loggedIn = loginResult is not None 767 758 if result.loggedIn: 768 result.pilotID = self._pilotID759 result.pilotID = pilotID 769 760 result.pilotName = loginResult[0] 770 761 result.rank = loginResult[1] 771 result.password = self._password772 result.flights = self._client.getFlights()762 result.password = password 763 result.flights = client.getFlights() 773 764 if result.rank=="STU": 774 reply = self._client.getEntryExamStatus()765 reply = client.getEntryExamStatus() 775 766 result.entryExamPassed = reply[0] 776 767 result.entryExamLink = reply[1] … … 778 769 if reply[3]: 779 770 result.rank = "FO" 771 772 def __init__(self, client, callback, pilotID, password): 773 """Construct the login request with the given pilot ID and 774 password.""" 775 super(LoginRPC, self).__init__(client, callback) 776 777 self._pilotID = pilotID 778 self._password = password 779 780 def run(self): 781 """Perform the login request.""" 782 result = Result() 783 784 self._client.setCredentials(self._pilotID, self._password) 785 LoginRPC.setupLoginResult(result, self._client, 786 self._pilotID, self._password) 780 787 781 788 return result
Note:
See TracChangeset
for help on using the changeset viewer.