Skip to content

Commit 5da2143

Browse files
committed
Remove quoting for system locales to make sure they match locales obtained from postgres
1 parent 573893d commit 5da2143

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cloudlinux7to8/actions/postgres.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ def _do_check(self):
4747
log.debug(f"Got unexpected Postgres locales set: {pg_locales!r}")
4848
return False
4949

50-
sys_locales = set(l.split('=')[1].strip() for l in files.find_file_substrings('/etc/locale.conf', 'LANG='))
50+
sys_locales = set(
51+
locale_str.split('=')[1].strip().strip('"') for locale_str
52+
in files.find_file_substrings('/etc/locale.conf', 'LANG=')
53+
)
5154
env_locale = locale.getlocale()
5255
if env_locale and env_locale[0]:
5356
sys_locales.add('.'.join(map(str, env_locale)))

0 commit comments

Comments
 (0)