Skip to content

Commit

Permalink
py36 handling
Browse files Browse the repository at this point in the history
  • Loading branch information
caronc committed Nov 12, 2022
1 parent b0b2f52 commit bf83a0c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apprise/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1486,8 +1486,13 @@ def environ(*remove, **update):
finally:
# Restore our snapshot
os.environ = env_orig.copy()
# Restore locale
locale.setlocale(locale.LC_ALL, loc_orig)
try:
# Restore locale
locale.setlocale(locale.LC_ALL, loc_orig)

except locale.Error:
# Thrown in py3.6
pass


def apply_template(template, app_mode=TemplateType.RAW, **kwargs):
Expand Down

0 comments on commit bf83a0c

Please sign in to comment.