Show More
@@ -87,5 +87,5 b' EXTENSIONS = {}' | |||||
87 | __author__ = 'RhodeCode GmbH' |
|
87 | __author__ = 'RhodeCode GmbH' | |
88 | __url__ = 'https://code.rhodecode.com' |
|
88 | __url__ = 'https://code.rhodecode.com' | |
89 |
|
89 | |||
90 | is_test = os.getenv('RC_TEST') |
|
90 | is_test = os.getenv('RC_TEST', '0') == '1' | |
91 | disable_error_handler = False |
|
91 | disable_error_handler = False |
@@ -89,6 +89,7 b' class DBBackend(object):' | |||||
89 | 'startup.import_repos': 'false'}}] |
|
89 | 'startup.import_repos': 'false'}}] | |
90 | _db_url = [{'app:main': {'sqlalchemy.db1.url': ''}}] |
|
90 | _db_url = [{'app:main': {'sqlalchemy.db1.url': ''}}] | |
91 | _base_db_name = 'rhodecode_test_db_backend' |
|
91 | _base_db_name = 'rhodecode_test_db_backend' | |
|
92 | std_env = {'RC_TEST': '0'} | |||
92 |
|
93 | |||
93 | def __init__( |
|
94 | def __init__( | |
94 | self, config_file, db_name=None, basetemp=None, |
|
95 | self, config_file, db_name=None, basetemp=None, | |
@@ -134,13 +135,15 b' class DBBackend(object):' | |||||
134 | """ |
|
135 | """ | |
135 |
|
136 | |||
136 | command = cmd + ' ' + ' '.join(args) |
|
137 | command = cmd + ' ' + ' '.join(args) | |
137 | sys.stdout.write(command) |
|
138 | sys.stdout.write(f'CMD: {command}') | |
138 |
|
139 | |||
139 | # Tell Python to use UTF-8 encoding out stdout |
|
140 | # Tell Python to use UTF-8 encoding out stdout | |
140 | _env = os.environ.copy() |
|
141 | _env = os.environ.copy() | |
141 | _env['PYTHONIOENCODING'] = 'UTF-8' |
|
142 | _env['PYTHONIOENCODING'] = 'UTF-8' | |
|
143 | _env.update(self.std_env) | |||
142 | if env: |
|
144 | if env: | |
143 | _env.update(env) |
|
145 | _env.update(env) | |
|
146 | ||||
144 | self.p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE, env=_env) |
|
147 | self.p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE, env=_env) | |
145 | self.stdout, self.stderr = self.p.communicate() |
|
148 | self.stdout, self.stderr = self.p.communicate() | |
146 | stdout_str = safe_str(self.stdout) |
|
149 | stdout_str = safe_str(self.stdout) |
General Comments 0
You need to be logged in to leave comments.
Login now