Skip to content

Commit

Permalink
fix: ckan_uwsgi parser
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Nov 10, 2023
1 parent 5400286 commit 7b44470
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.8.13
- update incompatible versions
- fix: ckan_uwsgi parser
0.8.12
- maintenance release
0.8.11
Expand Down
10 changes: 8 additions & 2 deletions dcor_control/inspect/config_uwsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ def check_uwsgi(harakiri, autocorrect=False):
with open(path_uwsgi) as fd:
lines = fd.readlines()
for ii, line in enumerate(lines):
if line.startswith("harakiri"):
value = int(line.split("=")[1])
data = line.split("=", 1)
if len(data) < 2:
continue
else:
key, value = data
key = key.strip()
if key == "harakiri":
value = int(value)
if value != harakiri:
if autocorrect:
change = True
Expand Down

0 comments on commit 7b44470

Please sign in to comment.