From f64f2beeb08beb780a729d081c12e3ee23e6ba49 Mon Sep 17 00:00:00 2001 From: Wilfred Tyler Gee Date: Thu, 8 Feb 2018 18:56:22 +1100 Subject: [PATCH] Cleanup inconsistency in take_exposure call (#457) The base method and sbig expect `*args, **kwargs`. Warning messages were appearing in the tests for the simulator --- pocs/camera/canon_gphoto2.py | 2 +- pocs/camera/simulator.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pocs/camera/canon_gphoto2.py b/pocs/camera/canon_gphoto2.py index 573f7d42b..e2088b363 100644 --- a/pocs/camera/canon_gphoto2.py +++ b/pocs/camera/canon_gphoto2.py @@ -104,7 +104,7 @@ def take_observation(self, observation, headers=None, filename=None, *args, **kw return camera_event - def take_exposure(self, seconds=1.0 * u.second, filename=None): + def take_exposure(self, seconds=1.0 * u.second, filename=None, *args, **kwargs): """Take an exposure for given number of seconds and saves to provided filename Note: diff --git a/pocs/camera/simulator.py b/pocs/camera/simulator.py index d44a8fc07..be1ae98f5 100644 --- a/pocs/camera/simulator.py +++ b/pocs/camera/simulator.py @@ -58,7 +58,13 @@ def take_observation(self, observation, headers=None, filename=None, *args, **kw return camera_event - def take_exposure(self, seconds=1.0 * u.second, filename=None, dark=False, blocking=False): + def take_exposure(self, + seconds=1.0 * u.second, + filename=None, + dark=False, + blocking=False, + *args, + **kwargs): """ Take an exposure for given number of seconds """ assert self.is_connected, self.logger.error("Camera must be connected for take_exposure!")