forked from extern/wg-meshconf
fixed import not found issues
This commit is contained in:
parent
215032f0c3
commit
40872a138a
@ -19,7 +19,10 @@ with contextlib.suppress(ImportError):
|
|||||||
from prettytable import PrettyTable
|
from prettytable import PrettyTable
|
||||||
|
|
||||||
# local imports
|
# local imports
|
||||||
from .wireguard import WireGuard
|
try:
|
||||||
|
from wireguard import WireGuard
|
||||||
|
except ImportError:
|
||||||
|
from .wireguard import WireGuard
|
||||||
|
|
||||||
INTERFACE_ATTRIBUTES = [
|
INTERFACE_ATTRIBUTES = [
|
||||||
"Address",
|
"Address",
|
||||||
|
@ -17,7 +17,10 @@ import pathlib
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
# local imports
|
# local imports
|
||||||
from .database_manager import DatabaseManager
|
try:
|
||||||
|
from database_manager import DatabaseManager
|
||||||
|
except ImportError:
|
||||||
|
from .database_manager import DatabaseManager
|
||||||
|
|
||||||
|
|
||||||
def parse_arguments():
|
def parse_arguments():
|
||||||
@ -192,3 +195,8 @@ def main():
|
|||||||
"No command specified\nUse wg-meshconf --help to see available commands",
|
"No command specified\nUse wg-meshconf --help to see available commands",
|
||||||
file=sys.stderr,
|
file=sys.stderr,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# launch the main function if it is not imported as a package
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user