From c1d33e9f72e628de02f7a3e3df0dd9560f011cee Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Mon, 14 May 2012 19:31:50 -0400 Subject: [PATCH] CC-3791: Media Monitor crash when there are media files with non-ascii name in watched folder -syntax errors --- python_apps/media-monitor/media_monitor.py | 2 +- python_apps/pypo/pypocli.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python_apps/media-monitor/media_monitor.py b/python_apps/media-monitor/media_monitor.py index 2a4558191..024b5ae41 100644 --- a/python_apps/media-monitor/media_monitor.py +++ b/python_apps/media-monitor/media_monitor.py @@ -49,7 +49,7 @@ def configure_locale(): new_locale = default_locale test = re.compile(r"UTF-?8", re.IGNORECASE) - if re.findall(new_locale): + if test.findall(new_locale): logger.info("New locale set to: %s", locale.setlocale(locale.LC_ALL, new_locale)) else: logger.info("Invalid locale %s", new_locale) diff --git a/python_apps/pypo/pypocli.py b/python_apps/pypo/pypocli.py index b1c58fc88..0f804fd30 100644 --- a/python_apps/pypo/pypocli.py +++ b/python_apps/pypo/pypocli.py @@ -72,7 +72,7 @@ def configure_locale(): new_locale = default_locale test = re.compile(r"UTF-?8", re.IGNORECASE) - if re.findall(new_locale): + if test.findall(new_locale): logger.info("New locale set to: %s", locale.setlocale(locale.LC_ALL, new_locale)) else: logger.info("Invalid locale %s", new_locale)