MCPcopy Create free account
hub / github.com/davispuh/MySQL-for-Python-3 / mysql_config

Function mysql_config

setup_posix.py:15–26  ·  view source on GitHub ↗
(what)

Source from the content-addressed store, hash-verified

13 return "-{}".format(f);
14
15def mysql_config(what):
16 from os import popen
17
18 f = popen("{} --{}".format(mysql_config.path, what))
19 data = f.read().strip().split()
20 ret = f.close()
21 if ret:
22 if ret/256:
23 data = []
24 if ret/256 > 1:
25 raise EnvironmentError("{} not found".format(mysql_config.path))
26 return data
27mysql_config.path = "mysql_config"
28
29def get_config():

Callers 1

get_configFunction · 0.85

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected