mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-18 06:51:54 +00:00
Flock: pinned version; nicer error message when submodule not found
This commit is contained in:
parent
ee182f9869
commit
2b62caa544
1
.gitmodules
vendored
1
.gitmodules
vendored
@ -4,3 +4,4 @@
|
|||||||
[submodule "python/flock"]
|
[submodule "python/flock"]
|
||||||
path = python/flock
|
path = python/flock
|
||||||
url = https://gitlab.nic.cz/labs/flock
|
url = https://gitlab.nic.cz/labs/flock
|
||||||
|
branch = v0.0
|
||||||
|
@ -6,7 +6,12 @@ import pathlib
|
|||||||
import sys
|
import sys
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
sys.path.insert(0, "python/flock")
|
flock_path = pathlib.Path(__file__).parent.parent / "flock"
|
||||||
|
if not (flock_path / "README.md").exists():
|
||||||
|
print("Flock not found, have you run \"git submodule update\"?")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
sys.path.insert(0, str(flock_path))
|
||||||
|
|
||||||
from flock.Hypervisor import Hypervisor
|
from flock.Hypervisor import Hypervisor
|
||||||
from flock.Machine import Machine
|
from flock.Machine import Machine
|
||||||
|
Loading…
Reference in New Issue
Block a user