Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
rotu committed Jul 5, 2023
1 parent 7032a7d commit 88da9de
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tools/mavgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
Released under GNU GPL version 3 or later
'''

# allow running mavgen from within the tree without installing
if __name__ == "__main__" and __package__ is None:
from os import sys, path
sys.path.insert(0, path.dirname(path.dirname(path.dirname(path.abspath(__file__)))))
from importlib.machinery import SourceFileLoader
from os import path
SourceFileLoader("pymavlink", path.join(__file__, '../../__init__.py')).load_module()
__package__ = 'pymavlink.tools'

from pymavlink.generator import mavgen
from pymavlink.generator import mavparse
from ..generator import mavgen, mavparse

from argparse import ArgumentParser

Expand Down

0 comments on commit 88da9de

Please sign in to comment.