Skip to content

Commit

Permalink
allow importing pydronecan from ../pydronecan for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Feb 11, 2024
1 parent aea1435 commit a2a1cde
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dronecan_dsdlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@
try:
import dronecan.dsdl
except Exception as ex:
print(ex)
print("Failed to import dronecan.dsdl, please install dronecan with 'python3 -m pip install dronecan'")
sys.exit(1)
# for usage in CI try with a local pydronecan path
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "../pydronecan/"))
try:
import dronecan.dsdl
except Exception as ex:
print(ex)
print("Failed to import dronecan.dsdl, please install dronecan with 'python3 -m pip install dronecan'")
sys.exit(1)

from dronecan_dsdlc_helpers import *
from dronecan_dsdlc_tester import *
Expand Down

0 comments on commit a2a1cde

Please sign in to comment.