Skip to content

Commit

Permalink
check if image name is not None before removing the old image #240
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaBurek committed Feb 27, 2023
1 parent 33b37d3 commit f276c02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metplotpy/plots/base_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def remove_file(self):
image_name = self.get_config_value('plot_filename')

# remove the old file if it exist
if os.path.exists(image_name):
if image_name is not None and os.path.exists(image_name):
os.remove(image_name)

def show_in_browser(self):
Expand Down

0 comments on commit f276c02

Please sign in to comment.