Skip to content

Commit

Permalink
Fixing warning when LaTex is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Mar 7, 2022
1 parent 7cea5d7 commit ffda9ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions GooseMPL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def copy_style():

warnings.warn(message, Warning)

styles["goose-latex.mplstyle"] = {}
styles["goose-latex.mplstyle"] = None

# write style definitions
# -----------------------
Expand All @@ -165,7 +165,8 @@ def copy_style():
# write all styles
for fname, style in styles.items():
with open(os.path.join(dirname, fname), "w") as file:
yaml.dump(style, file)
if style is not None:
yaml.dump(style, file)


def latex_float(number, fmt="{0:.2g}"):
Expand Down

0 comments on commit ffda9ed

Please sign in to comment.