Conditions | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | #!/usr/bin/env python3 |
||
12 | def check_configuration(client): |
||
13 | """ |
||
14 | Checking Drupal database configuration |
||
15 | :param client: String |
||
16 | :return: |
||
17 | """ |
||
18 | _path = system.config[client]['path'] |
||
19 | |||
20 | _db_config = { |
||
21 | 'name': get_database_setting(client, 'DB_NAME', system.config[client]['path']), |
||
22 | 'host': get_database_setting(client, 'DB_HOST', system.config[client]['path']), |
||
23 | 'password': get_database_setting(client, 'DB_PASSWORD', system.config[client]['path']), |
||
24 | 'port': get_database_setting(client, 'DB_PORT', system.config[client]['path']) if get_database_setting(client, 'DB_PORT', system.config[client]['path']) != '' else 3306, |
||
25 | 'user': get_database_setting(client, 'DB_USER', system.config[client]['path']), |
||
26 | } |
||
27 | |||
28 | system.config[client]['db'] = _db_config |
||
29 | |||
46 |