From bf83a0ccfb1bdf5a65b38fe16c55cd7c3ed1882c Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Sat, 12 Nov 2022 13:53:13 -0500 Subject: [PATCH] py36 handling --- apprise/utils.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apprise/utils.py b/apprise/utils.py index 47f4735aad..a810e60ede 100644 --- a/apprise/utils.py +++ b/apprise/utils.py @@ -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):