Skip to content

Commit

Permalink
some pyflakes warnings cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
ianfixes committed Oct 18, 2012
1 parent 916039f commit c968c57
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 24 deletions.
44 changes: 22 additions & 22 deletions ion/services/sa/instrument/instrument_management_service.py
Expand Up @@ -145,39 +145,39 @@ def override_clients(self, new_clients):
#shortcut names for the import sub-services
# we hide these behind checks even though we expect them so that
# the resource_impl_metatests will work
if hasattr(self.clients, "resource_registry"):
self.RR = self.clients.resource_registry
if hasattr(new_clients, "resource_registry"):
self.RR = new_clients.resource_registry

if hasattr(self.clients, "data_acquisition_management"):
self.DAMS = self.clients.data_acquisition_management
if hasattr(new_clients, "data_acquisition_management"):
self.DAMS = new_clients.data_acquisition_management

if hasattr(self.clients, "data_product_management"):
self.DPMS = self.clients.data_product_management
if hasattr(new_clients, "data_product_management"):
self.DPMS = new_clients.data_product_management

if hasattr(self.clients, "pubsub_management"):
self.PSMS = self.clients.pubsub_management
if hasattr(new_clients, "pubsub_management"):
self.PSMS = new_clients.pubsub_management

if hasattr(self.clients, "data_retriever"):
self.DRS = self.clients.data_retriever
if hasattr(new_clients, "data_retriever"):
self.DRS = new_clients.data_retriever

#farm everything out to the impls

self.instrument_agent = InstrumentAgentImpl(self.clients)
self.instrument_agent_instance = InstrumentAgentInstanceImpl(self.clients)
self.instrument_model = InstrumentModelImpl(self.clients)
self.instrument_device = InstrumentDeviceImpl(self.clients)
self.instrument_agent = InstrumentAgentImpl(new_clients)
self.instrument_agent_instance = InstrumentAgentInstanceImpl(new_clients)
self.instrument_model = InstrumentModelImpl(new_clients)
self.instrument_device = InstrumentDeviceImpl(new_clients)

self.platform_agent = PlatformAgentImpl(self.clients)
self.platform_agent_instance = PlatformAgentInstanceImpl(self.clients)
self.platform_model = PlatformModelImpl(self.clients)
self.platform_device = PlatformDeviceImpl(self.clients)
self.platform_agent = PlatformAgentImpl(new_clients)
self.platform_agent_instance = PlatformAgentInstanceImpl(new_clients)
self.platform_model = PlatformModelImpl(new_clients)
self.platform_device = PlatformDeviceImpl(new_clients)

self.sensor_model = SensorModelImpl(self.clients)
self.sensor_device = SensorDeviceImpl(self.clients)
self.sensor_model = SensorModelImpl(new_clients)
self.sensor_device = SensorDeviceImpl(new_clients)

#TODO: may not belong in this service
self.data_product = DataProductImpl(self.clients)
self.data_producer = DataProducerImpl(self.clients)
self.data_product = DataProductImpl(new_clients)
self.data_producer = DataProducerImpl(new_clients)



Expand Down
2 changes: 1 addition & 1 deletion ion/services/sa/observatory/test/test_deployment.py
Expand Up @@ -102,7 +102,7 @@ def test_create_deployment(self):
# now try to get the deleted dp object
try:
deployment_obj = self.omsclient.read_deployment(deployment_id)
except NotFound as ex:
except NotFound:
pass
else:
self.fail("deleted deployment was found during read")
Expand Down
1 change: 0 additions & 1 deletion ion/services/sa/test/test_assembly.py
Expand Up @@ -124,7 +124,6 @@ def test_observatory_structure(self):
sensor_device_impl = SensorDeviceImpl(c2)
resource_impl = ResourceImpl(c2)

instrument_agent_instance_impl = InstrumentAgentInstanceImpl(c2)

#generate a function that finds direct associations, using the more complex one in the service
def gen_find_oms_association(output_type):
Expand Down

0 comments on commit c968c57

Please sign in to comment.