Skip to content

Commit

Permalink
fix: move path append command back up (#1346)
Browse files Browse the repository at this point in the history
Script can only be executed if sys.path.append(".") is executed before imports.
This bug (#1249 (comment))
was introduced with change #1332.
  • Loading branch information
jeripeierSBB authored Mar 22, 2021
1 parent ab75551 commit e7da4b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/components/controls/buttons_usb_encoder/ @jeripeierSBB
/scripts/installscripts/buster-install-default.sh @jeripeierSBB
/scripts/installscripts/buster-install-default-with-autohotspot.sh @jeripeierSBB
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/usr/bin/env python3

import sys

sys.path.append(".") # This command should be before imports of components

import logging
from evdev import categorize, ecodes, KeyEvent
from io_buttons_usb_encoder import button_map, current_device
from components.gpio_control.function_calls import phoniebox_function_calls

sys.path.append(".")

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env python3

import sys

sys.path.append(".") # This command should be before imports of components

from evdev import categorize, ecodes, KeyEvent
from io_buttons_usb_encoder import current_device, write_button_map
import components.gpio_control.function_calls

sys.path.append(".")


try:
functions = list(
filter(lambda function_name: function_name.startswith("functionCall"),
Expand Down

0 comments on commit e7da4b0

Please sign in to comment.