Changeset 853:28eb49544c0f for src/mlx/web.py
- Timestamp:
- 05/21/17 07:42:48 (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
r829 r853 1144 1144 """A request to send a PIREP to the MAVA website via the RPC interface.""" 1145 1145 1146 def __init__(self, client, callback, pirep ):1146 def __init__(self, client, callback, pirep, update): 1147 1147 """Construct the sending of the PIREP.""" 1148 1148 super(SendPIREPRPC, self).__init__(client, callback) 1149 1149 self._pirep = pirep 1150 self._update = update 1150 1151 1151 1152 def run(self): 1152 1153 """Perform the sending of the PIREP.""" 1153 1154 pirep = self._pirep 1154 resultCode = self._client.addPIREP(pirep.bookedFlight.id, pirep) 1155 resultCode = self._client.addPIREP(pirep.bookedFlight.id, pirep, 1156 self._update) 1155 1157 1156 1158 result = Result() … … 1286 1288 print "pirepData:", pirepData 1287 1289 1288 bookedFlight = BookedFlight( )1290 bookedFlight = BookedFlight(self._flightID) 1289 1291 bookedFlight.setupFromPIREPData(pirepData) 1290 1292 … … 1382 1384 self._addRequest(GetMETARs(callback, airports)) 1383 1385 1384 def sendPIREP(self, callback, pirep ):1386 def sendPIREP(self, callback, pirep, update = False): 1385 1387 """Send the given PIREP.""" 1386 1388 request = \ 1387 SendPIREPRPC(self._rpcClient, callback, pirep ) if self._config.useRPC\1388 else SendPIREP(callback, pirep)1389 SendPIREPRPC(self._rpcClient, callback, pirep, update) \ 1390 if self._config.useRPC else SendPIREP(callback, pirep) 1389 1391 self._addRequest(request) 1390 1392
Note:
See TracChangeset
for help on using the changeset viewer.