Skip to content

Commit

Permalink
[bugfix] use get to get an empty dict if plot params don't have data …
Browse files Browse the repository at this point in the history
…key.
  • Loading branch information
sneakers-the-rat committed Aug 19, 2021
1 parent ebf2619 commit 9a8c0e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autopilot/core/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def l_start(self, value):
pass

# Make plot items for each data type
for data, plot in self.plot_params['data'].items():
for data, plot in self.plot_params.get('data', {}).items():
# TODO: Better way of doing params for plots, redo when params are refactored
if plot == 'rollmean' and 'roll_window' in self.plot_params.keys():
self.plots[data] = Roll_Mean(winsize=self.plot_params['roll_window'])
Expand Down

0 comments on commit 9a8c0e6

Please sign in to comment.