# HG changeset patch # User Julien Cristau # Date 1392044776 -3600 # Node ID 32662203e334093b5affb049af7914590109ca97 # Parent a7e0746f010c2a750edc6ecc45e9c852ffa8de6c [devtools] force locale to C for postgresql test clusters Avoids initdb failure with e.g. iso8859-X locale and utf-8 encoding. diff -r a7e0746f010c -r 32662203e334 devtools/__init__.py --- a/devtools/__init__.py Tue Feb 04 11:23:58 2014 +0100 +++ b/devtools/__init__.py Mon Feb 10 16:06:16 2014 +0100 @@ -545,7 +545,7 @@ super(PostgresTestDataBaseHandler, self).__init__(config) datadir = join(self.config.apphome, 'pgdb') if not exists(datadir): - subprocess.check_call(['initdb', '-D', datadir, '-E', 'utf-8']) + subprocess.check_call(['initdb', '-D', datadir, '-E', 'utf-8', '--locale=C']) port = self.system_source['db-port'] subprocess.check_call(['pg_ctl', 'start', '-w', '-D', datadir, '-o', '-h "" -k /tmp -p %s' % port]) self.__CTL.add(datadir)