Skip to content

Commit

Permalink
Fix running pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
kizniche committed Nov 23, 2023
1 parent ca9bbb0 commit 6e5d1c1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
### Bugfixes

- Fix Actions not executing for MQTT, TTN, and Python Code Inputs ([#1336](https://github.com/kizniche/Mycodo/issues/1336))
- Fix Python Code Inputs running pylint
- Fix running pylint


## 8.15.12 (2023.10.28)
Expand Down
2 changes: 1 addition & 1 deletion mycodo/outputs/on_off_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def execute_at_modification(
'export PYLINTHOME=/var/mycodo-root/.pylint.d && ' \
'{dir}/env/bin/python -m pylint -d I,W0621,C0103,C0111,C0301,C0327,C0410,C0413 {path}'.format(
dir=INSTALL_DIRECTORY, path=file_run)
cmd_out, cmd_error, cmd_status = cmd_output(cmd_test)
cmd_out, cmd_error, cmd_status = cmd_output(cmd_test, user='root')
pylint_message = Markup(
'<pre>\n\n'
'Full Python code:\n\n{code}\n\n'
Expand Down
2 changes: 1 addition & 1 deletion mycodo/outputs/pwm_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def execute_at_modification(
'export PYLINTHOME=/var/mycodo-root/.pylint.d && ' \
'{dir}/env/bin/python -m pylint -d I,W0621,C0103,C0111,C0301,C0327,C0410,C0413 {path}'.format(
dir=INSTALL_DIRECTORY, path=file_run)
cmd_out, cmd_error, cmd_status = cmd_output(cmd_test)
cmd_out, cmd_error, cmd_status = cmd_output(cmd_test, user='root')
pylint_message = Markup(
'<pre>\n\n'
'Full Python code:\n\n{code}\n\n'
Expand Down
2 changes: 1 addition & 1 deletion mycodo/utils/code_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_python_code(python_code_run, filename):
'export PYLINTHOME=/var/mycodo-root/.pylint.d && ' \
'{dir}/env/bin/python -m pylint -d I,W0621,C0103,C0111,C0301,C0327,C0410,C0413,R0201,R0903,W0201,W0612 {path}'.format(
dir=INSTALL_DIRECTORY, path=file_run)
cmd_out, _, cmd_status = cmd_output(cmd_test)
cmd_out, _, cmd_status = cmd_output(cmd_test, user='root')

message = Markup(
'<pre>\n\n'
Expand Down
2 changes: 1 addition & 1 deletion mycodo/utils/conditional.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def function_status(self):
'export PYLINTHOME=/var/mycodo-root/.pylint.d && ' \
'{dir}/env/bin/python -m pylint -d I,W0621,C0103,C0111,C0301,C0327,C0410,C0413,R0912,R0914,R0915 {path}'.format(
dir=INSTALL_DIRECTORY, path=file_run)
cmd_out, cmd_err, cmd_status = cmd_output(cmd_test)
cmd_out, cmd_err, cmd_status = cmd_output(cmd_test, user='root')
if cmd_err:
error.append(str(cmd_err))
except Exception as err:
Expand Down

1 comment on commit 6e5d1c1

@wbard93
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made these changes and re-installed it and it seems to fix the conditional controller function issue. Thanks!

Please sign in to comment.