From cf32290dd3a0561585837fddfcdb08b3389f356a Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 26 Oct 2016 16:17:46 -0700 Subject: [PATCH 1/4] Use correct type for port in GVariant tuple The type is `(sqa{sv})`, where `q` (according to the docs) is "an unsigned 16 bit integer", so this should be an int, not a string. --- blivet/iscsi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blivet/iscsi.py b/blivet/iscsi.py index 8773509..14c4b9a 100644 --- a/blivet/iscsi.py +++ b/blivet/iscsi.py @@ -369,7 +369,7 @@ class iSCSI(object): if r_password: auth_info["r_password"] = GLib.Variant("s", r_password) - args = GLib.Variant("(sqa{sv})", (ipaddr, port, auth_info)) + args = GLib.Variant("(sqa{sv})", (ipaddr, int(port), auth_info)) nodes, _n_nodes = self._call_initiator_method("DiscoverSendTargets", args) found_nodes = _to_node_infos(nodes) -- 2.7.4