db-sync-tool-kmi 2.11.6__py3-none-any.whl → 2.11.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of db-sync-tool-kmi might be problematic. Click here for more details.
- db_sync_tool/info.py +1 -1
- db_sync_tool/recipes/drupal.py +1 -1
- db_sync_tool/recipes/laravel.py +2 -2
- db_sync_tool/recipes/symfony.py +1 -1
- db_sync_tool/recipes/typo3.py +1 -1
- db_sync_tool/recipes/wordpress.py +1 -1
- db_sync_tool/utility/helper.py +28 -0
- {db_sync_tool_kmi-2.11.6.dist-info → db_sync_tool_kmi-2.11.7.dist-info}/METADATA +1 -1
- {db_sync_tool_kmi-2.11.6.dist-info → db_sync_tool_kmi-2.11.7.dist-info}/RECORD +13 -13
- {db_sync_tool_kmi-2.11.6.dist-info → db_sync_tool_kmi-2.11.7.dist-info}/LICENSE +0 -0
- {db_sync_tool_kmi-2.11.6.dist-info → db_sync_tool_kmi-2.11.7.dist-info}/WHEEL +0 -0
- {db_sync_tool_kmi-2.11.6.dist-info → db_sync_tool_kmi-2.11.7.dist-info}/entry_points.txt +0 -0
- {db_sync_tool_kmi-2.11.6.dist-info → db_sync_tool_kmi-2.11.7.dist-info}/top_level.txt +0 -0
db_sync_tool/info.py
CHANGED
db_sync_tool/recipes/drupal.py
CHANGED
|
@@ -41,7 +41,7 @@ def check_configuration(client):
|
|
|
41
41
|
|
|
42
42
|
_db_config = parse_database_credentials(json.loads(stdout))
|
|
43
43
|
|
|
44
|
-
system.config[client]['db'] = _db_config
|
|
44
|
+
system.config[client]['db'] = helper.clean_db_config(_db_config)
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
def parse_database_credentials(db_credentials):
|
db_sync_tool/recipes/laravel.py
CHANGED
|
@@ -15,13 +15,13 @@ def check_configuration(client):
|
|
|
15
15
|
"""
|
|
16
16
|
_path = system.config[client]['path']
|
|
17
17
|
|
|
18
|
-
system.config[client]['db'] = {
|
|
18
|
+
system.config[client]['db'] = helper.clean_db_config({
|
|
19
19
|
'name': get_database_parameter(client, 'DB_DATABASE', _path),
|
|
20
20
|
'host': get_database_parameter(client, 'DB_HOST', _path),
|
|
21
21
|
'password': get_database_parameter(client, 'DB_PASSWORD', _path),
|
|
22
22
|
'port': get_database_parameter(client, 'DB_PORT', _path),
|
|
23
23
|
'user': get_database_parameter(client, 'DB_USERNAME', _path),
|
|
24
|
-
}
|
|
24
|
+
})
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def get_database_parameter(client, name, file):
|
db_sync_tool/recipes/symfony.py
CHANGED
|
@@ -38,7 +38,7 @@ def check_configuration(client):
|
|
|
38
38
|
)
|
|
39
39
|
_db_config = parse_database_credentials(stdout)
|
|
40
40
|
|
|
41
|
-
system.config[client]['db'] = _db_config
|
|
41
|
+
system.config[client]['db'] = helper.clean_db_config(_db_config)
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
def parse_database_credentials(db_credentials):
|
db_sync_tool/recipes/typo3.py
CHANGED
|
@@ -25,7 +25,7 @@ def check_configuration(client):
|
|
|
25
25
|
'user': get_database_setting(client, 'DB_USER', system.config[client]['path']),
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
system.config[client]['db'] = _db_config
|
|
28
|
+
system.config[client]['db'] = helper.clean_db_config(_db_config)
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
def get_database_setting(client, name, file):
|
db_sync_tool/utility/helper.py
CHANGED
|
@@ -323,3 +323,31 @@ def confirm(prompt=None, resp=False):
|
|
|
323
323
|
return True
|
|
324
324
|
if ans == 'n' or ans == 'N':
|
|
325
325
|
return False
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
def clean_db_config(config):
|
|
329
|
+
"""
|
|
330
|
+
Iterates over all entries of a dictionary and removes enclosing inverted commas
|
|
331
|
+
from the values, if present.
|
|
332
|
+
|
|
333
|
+
:param config: The dictionary to be edited
|
|
334
|
+
:return: A new dictionary with adjusted values
|
|
335
|
+
"""
|
|
336
|
+
# Iterate over all entries in the dictionary and use the inverted comma function
|
|
337
|
+
return {key: remove_surrounding_quotes(value) for key, value in config.items()}
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
def remove_surrounding_quotes(s):
|
|
341
|
+
"""
|
|
342
|
+
Removes the enclosing inverted commas (single or double),
|
|
343
|
+
if there are quotes at both the beginning and the end of the string.
|
|
344
|
+
|
|
345
|
+
:param s: The string to be checked
|
|
346
|
+
:return: The string without enclosing quotes, if available
|
|
347
|
+
"""
|
|
348
|
+
if isinstance(s, str):
|
|
349
|
+
if s.startswith('"') and s.endswith('"'):
|
|
350
|
+
return s[1:-1]
|
|
351
|
+
elif s.startswith("'") and s.endswith("'"):
|
|
352
|
+
return s[1:-1]
|
|
353
|
+
return s
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
db_sync_tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
db_sync_tool/__main__.py,sha256=-pD13j2oYcKLhPprLy-LQeDCapj-FKrV3CDFHuYJu3g,11541
|
|
3
|
-
db_sync_tool/info.py,sha256=
|
|
3
|
+
db_sync_tool/info.py,sha256=hh8zjO1L4Fpu06f1t3M0x5DaYUYIuTqzWl7gMFNMFc0,165
|
|
4
4
|
db_sync_tool/sync.py,sha256=WMfMts0M8z3oecI-HL07xG9ktbba8D8h7_U-8tBwizY,2087
|
|
5
5
|
db_sync_tool/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
db_sync_tool/database/process.py,sha256=zmaKkxMVLYG3kr7S9rUUuxE1fgsdKasRNOhxZgSfzvg,8357
|
|
7
7
|
db_sync_tool/database/utility.py,sha256=EfxWwHUsS6hVIMD4Jrz3n2_HQNBn3pB2GWo6OpWph4k,7783
|
|
8
8
|
db_sync_tool/recipes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
db_sync_tool/recipes/drupal.py,sha256=
|
|
10
|
-
db_sync_tool/recipes/laravel.py,sha256
|
|
11
|
-
db_sync_tool/recipes/symfony.py,sha256=
|
|
12
|
-
db_sync_tool/recipes/typo3.py,sha256=
|
|
13
|
-
db_sync_tool/recipes/wordpress.py,sha256=
|
|
9
|
+
db_sync_tool/recipes/drupal.py,sha256=jAo1d3vxZ4UZ4Vzk308Dsmn1--ORmVO2g87l8OpQoPw,1505
|
|
10
|
+
db_sync_tool/recipes/laravel.py,sha256=kp_gnKG0iyX_rzM0GW7Ca9ZPV3oGfEgGsLvJR_0pVDo,1175
|
|
11
|
+
db_sync_tool/recipes/symfony.py,sha256=8ObIRXdoBG1MbWD7pd1TxUQboz5LUWbfzz3TX6F9G5w,2517
|
|
12
|
+
db_sync_tool/recipes/typo3.py,sha256=7IejOtxASfskymG5jBFKmEzjl2sON3miKo_78Oqvi2g,4761
|
|
13
|
+
db_sync_tool/recipes/wordpress.py,sha256=KN3HTzDbs5p2GD7vvTEhBl7xNOiy2YHrXhVLmiF_y_A,1468
|
|
14
14
|
db_sync_tool/remote/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
db_sync_tool/remote/client.py,sha256=wjcoQ1jp9i8PMO_6XX2XMXZCoLXy-ySA38seZtY-Sns,6553
|
|
16
16
|
db_sync_tool/remote/rsync.py,sha256=VsLbCCgZRSXjmYz5o7B_OpKPna0X1WFqlr-irLN83EY,4252
|
|
@@ -18,7 +18,7 @@ db_sync_tool/remote/system.py,sha256=A9OIaypETMYx7frTKpXBgja-kXj7vSD6gJs8pUNpL_I
|
|
|
18
18
|
db_sync_tool/remote/transfer.py,sha256=pYVsad4SKkJ0TgZHcyLc17Z9xK6exdyO7R8TBe4qQcQ,5872
|
|
19
19
|
db_sync_tool/remote/utility.py,sha256=knTfzFKLdw2QsirvTfTz76XmckagKURKVBhjyREsQIo,3580
|
|
20
20
|
db_sync_tool/utility/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
-
db_sync_tool/utility/helper.py,sha256=
|
|
21
|
+
db_sync_tool/utility/helper.py,sha256=zf1dPKgb5loLcOUtinjHdY9D_E6Gp5kLjbS8R-bRrxw,8905
|
|
22
22
|
db_sync_tool/utility/info.py,sha256=8VdUMi3fsyykfMKKrmgUVoW9WEHPXbzPkVNHOIsNAMo,2976
|
|
23
23
|
db_sync_tool/utility/log.py,sha256=OdJsVKyvJqQYl5NUzb5bIg1uhUJ9kj7c7kT9oKbGvo8,869
|
|
24
24
|
db_sync_tool/utility/mode.py,sha256=DAkt-N5sYr6r2iTL_1sWu7_WHq04DNO4YjvBLkU3LeA,8588
|
|
@@ -26,9 +26,9 @@ db_sync_tool/utility/output.py,sha256=uoiWE7Pm8qv1a3vrBupZHE545d1uZSQHiLAUgkHofL
|
|
|
26
26
|
db_sync_tool/utility/parser.py,sha256=DIdWVGyiltyH8akoWyyXLvUmFPR-nvBrnzDctPJzgKw,6624
|
|
27
27
|
db_sync_tool/utility/system.py,sha256=G74lWGFcJNmLr0l6-GkZWmkk7q3icv4MccuHFKP_Vsw,18539
|
|
28
28
|
db_sync_tool/utility/validation.py,sha256=qZNPgkTwV_kJTNtFh0OXb2FHrsWPnDA2W_fftWs5hZc,3530
|
|
29
|
-
db_sync_tool_kmi-2.11.
|
|
30
|
-
db_sync_tool_kmi-2.11.
|
|
31
|
-
db_sync_tool_kmi-2.11.
|
|
32
|
-
db_sync_tool_kmi-2.11.
|
|
33
|
-
db_sync_tool_kmi-2.11.
|
|
34
|
-
db_sync_tool_kmi-2.11.
|
|
29
|
+
db_sync_tool_kmi-2.11.7.dist-info/LICENSE,sha256=o_R9gPKBRl4PQVcGCrWuTYsJQJ7uuQDcDaq-wapBUaw,1082
|
|
30
|
+
db_sync_tool_kmi-2.11.7.dist-info/METADATA,sha256=URT5TX1lofJ0YOFnFfi8gLK-6i1HoAiBG-3fU2RrEKQ,12505
|
|
31
|
+
db_sync_tool_kmi-2.11.7.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
32
|
+
db_sync_tool_kmi-2.11.7.dist-info/entry_points.txt,sha256=bVk6UR_ejpfY2oSCoOii7uKQivwV9MtA6Tdqpjg4Yvo,60
|
|
33
|
+
db_sync_tool_kmi-2.11.7.dist-info/top_level.txt,sha256=Uj5hJLhmdynFrBE0VnX0PfgIBC8_n7h2vgldqUQ-xfw,13
|
|
34
|
+
db_sync_tool_kmi-2.11.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|