fixed import not found issues

This commit is contained in:
K4YT3X 2021-01-12 21:39:58 -05:00
parent 215032f0c3
commit 40872a138a
2 changed files with 13 additions and 2 deletions

View File

@ -19,7 +19,10 @@ with contextlib.suppress(ImportError):
from prettytable import PrettyTable
# local imports
from .wireguard import WireGuard
try:
from wireguard import WireGuard
except ImportError:
from .wireguard import WireGuard
INTERFACE_ATTRIBUTES = [
"Address",

View File

@ -17,7 +17,10 @@ import pathlib
import sys
# local imports
from .database_manager import DatabaseManager
try:
from database_manager import DatabaseManager
except ImportError:
from .database_manager import DatabaseManager
def parse_arguments():
@ -192,3 +195,8 @@ def main():
"No command specified\nUse wg-meshconf --help to see available commands",
file=sys.stderr,
)
# launch the main function if it is not imported as a package
if __name__ == "__main__":
main()