Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Use aliases also to replace the data in incoming messages (eg. MSG3 -…
Browse files Browse the repository at this point in the history
…> Meteosat-10)
  • Loading branch information
pnuu committed Mar 9, 2015
1 parent c08d4c2 commit 97d91f7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions trollduction/producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,14 @@ def run(self, product_config, msg):

self.product_config = product_config

# Replace incoming information with aliases, if such exist
for key in product_config.aliases:
if key in msg.data:
LOGGER.debug("Replacing %s with alias: %s -> %s",
key, msg.data[key],
product_config.aliases[key][msg.data[key]])
msg.data[key] = product_config.aliases[key][msg.data[key]]

self.global_data = self.create_scene_from_message(msg)
self._data_ok = True

Expand Down

0 comments on commit 97d91f7

Please sign in to comment.