Skip to content

Commit e2bbafa

Browse files
committed
Fix: bootstrapping server fails while locating binaries
This patch corrects the ValueError raised when a path contains duplicated filenames of the MySQL binaries.
1 parent 9745318 commit e2bbafa

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/mysqld.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,21 @@ def _init_mysql_install(self):
194194
if (afile == EXEC_MYSQLD and
195195
os.access(os.path.join(root, afile), 0)):
196196
self._sbindir = root
197-
files_to_find.remove(EXEC_MYSQLD)
197+
LOGGER.debug("Located {} in {}".format(
198+
EXEC_MYSQLD, self._sbindir))
199+
try:
200+
files_to_find.remove(EXEC_MYSQLD)
201+
except ValueError:
202+
pass
198203
elif (afile == EXEC_MYSQL and
199204
os.access(os.path.join(root, afile), 0)):
200205
self._bindir = root
201-
files_to_find.remove(EXEC_MYSQL)
206+
LOGGER.debug("Located {} in {}".format(
207+
EXEC_MYSQL, self._bindir))
208+
try:
209+
files_to_find.remove(EXEC_MYSQLD)
210+
except ValueError:
211+
pass
202212

203213
if not files_to_find:
204214
break

0 commit comments

Comments
 (0)