Skip to content

Commit ab0ce43

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Use python-native keyword-only arguments"
2 parents 9e73ede + 703706c commit ab0ce43

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

nova/virt/libvirt/config.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,12 @@ def parse_libvirt_device_alias(alias):
5656

5757
class LibvirtConfigObject(object):
5858

59-
def __init__(self, **kwargs):
59+
def __init__(self, *, root_name, ns_prefix=None, ns_uri=None):
6060
super(LibvirtConfigObject, self).__init__()
6161

62-
self.root_name = kwargs.pop("root_name")
63-
self.ns_prefix = kwargs.pop("ns_prefix", None)
64-
self.ns_uri = kwargs.pop("ns_uri", None)
65-
66-
# handle programmer error
67-
assert not kwargs
62+
self.root_name = root_name
63+
self.ns_prefix = ns_prefix
64+
self.ns_uri = ns_uri
6865

6966
def _new_node(self, node_name, **kwargs):
7067
if self.ns_uri is None:

0 commit comments

Comments
 (0)