@@ -307,7 +307,7 @@ def do_postprocess():
307
307
308
308
return CopyTrajectory (traj , env = self .GetEnv ())
309
309
310
- if defer :
310
+ if defer is True :
311
311
from trollius .executor import get_default_executor
312
312
from trollius .futures import wrap_future
313
313
@@ -316,6 +316,10 @@ def do_postprocess():
316
316
317
317
return wrap_future (executor .submit (do_postprocess ))
318
318
else :
319
+ if defer is not False :
320
+ logger .warning ('Received unexpected value "%s" for defer.' ,
321
+ defer )
322
+
319
323
return do_postprocess ()
320
324
321
325
def ExecutePath (self , path , defer = False , executor = None , ** kwargs ):
@@ -350,7 +354,7 @@ def do_execute():
350
354
351
355
return self .ExecuteTrajectory (traj , defer = False , ** kwargs )
352
356
353
- if defer :
357
+ if defer is True :
354
358
from trollius .executor import get_default_executor
355
359
from trollius .futures import wrap_future
356
360
@@ -359,6 +363,10 @@ def do_execute():
359
363
360
364
return wrap_future (executor .submit (do_execute ))
361
365
else :
366
+ if defer is not False :
367
+ logger .warning ('Received unexpected value "%s" for defer.' ,
368
+ defer )
369
+
362
370
return do_execute ()
363
371
364
372
def ExecuteTrajectory (self , traj , defer = False , timeout = None , period = 0.01 ):
@@ -416,7 +424,7 @@ def ExecuteTrajectory(self, traj, defer=False, timeout=None, period=0.01):
416
424
'Trajectory includes the base, but no base controller is'
417
425
' available. Is self.base.controller set?' )
418
426
419
- if defer :
427
+ if defer is True :
420
428
import time
421
429
import trollius
422
430
@@ -436,6 +444,10 @@ def do_poll():
436
444
437
445
return trollius .async (do_poll ())
438
446
else :
447
+ if defer is not False :
448
+ logger .warning ('Received unexpected value "%s" for defer.' ,
449
+ defer )
450
+
439
451
util .WaitForControllers (active_controllers , timeout = timeout )
440
452
441
453
return traj
0 commit comments