Skip to content

Commit 8f7649c

Browse files
committed
munet: move yaml import to the only function that uses it.
This limits the dependency to the L3QemuVM cloud image code. Signed-off-by: Christian Hopps <chopps@labn.net>
1 parent b5a719e commit 8f7649c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

munet/native.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424

2525
from pathlib import Path
2626

27-
import yaml
27+
28+
try:
29+
# We only want to require yaml for the gen cloud image feature
30+
import yaml
31+
except ImportError:
32+
pass
2833

2934
from . import cli
3035
from .base import BaseMunet

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "munet"
3-
version = "0.15.3"
3+
version = "0.15.4"
44
description = "A package to facilitate network simulations"
55
authors = ["Christian Hopps <chopps@labn.net>"]
66
license = "GPL-2.0-or-later"

0 commit comments

Comments
 (0)