Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3037167ybv; Mon, 24 Feb 2020 16:53:04 -0800 (PST) X-Google-Smtp-Source: APXvYqx/Ly62TY++wXjhJHvX5aBpzhifuzfGlX7lZngOqauyxsBR4Fj6FRlU4VKMUaAg9A9nhUCk X-Received: by 2002:a05:6830:16d0:: with SMTP id l16mr43835700otr.83.1582591984847; Mon, 24 Feb 2020 16:53:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582591984; cv=none; d=google.com; s=arc-20160816; b=fOuYUQG9sSWgvmRe6YQzwtJKoNf+uJioJ9R3OSEzeoB5HD+6Ep+0vZzE2kti7Z9/8K p/MY/YYJs6+sMyygFTQdRTI1v6cDCIiWW2rgGCF2YBo+yBTjSo2ZesiFCs9qrDv4auS+ BQKUD47dVD1UBczNssa66jMaXL9IclsS3A6nqT02T3nzPFWNbYYpTtOtKLUfOcB55o5c /Ctpe28P9xuPMV5ZB6mxjb7n+TE3vWcg2yaTrmx1jSylNKksQNzp1jqKy+5cuU8VXrT2 J355s4BZc/T79D9iNe/lNLZG2HjubDY/wDQIKDcqWgTOOfJde/Z5BIfDWjQO2E75MTvG P33A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=X6Ux7rFKBPIlXN8srGv050pfADLweiLf+fU4nx0CyFc=; b=mMunI8o2QD96+P4oGlfRWmQJzAvyScRzscieAyfVmNi7TBLMgmxwGlNo8Pl3zhoiIe kku8Oop7O2WfZOYzsdegNgjPqn8rKqprzPyu0yKE+ZIv6+FPghN619o50K6xCF31mANI D1lZkdZouGmPmPbfOxKRe7XbI1oZwNvCHOMLuXl1J/8tVklGuiSxUfoor5GBS36tBFbG pyndS4ml8iHzZV1IKWI4Loo5Cwk1emdsOwI3z8DE/ktccGdqrwI+DfbmbbgGMSXZ7Dve QmiE4wR9DSzpW8RT+Z5nZv9I8/bwGeMRobp3UqhAbfA4rUUmcrK66vXrUOipi6pxmgh9 88tQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x138si5839608oif.142.2020.02.24.16.52.52; Mon, 24 Feb 2020 16:53:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728011AbgBYAvr (ORCPT + 99 others); Mon, 24 Feb 2020 19:51:47 -0500 Received: from mga14.intel.com ([192.55.52.115]:60211 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728608AbgBYAvr (ORCPT ); Mon, 24 Feb 2020 19:51:47 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Feb 2020 16:51:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,482,1574150400"; d="scan'208";a="436095390" Received: from ingas-nuc1.sea.intel.com ([10.251.142.189]) by fmsmga005.fm.intel.com with ESMTP; 24 Feb 2020 16:51:46 -0800 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ 5/5] test/test-mesh: Fix output of UpdateModelConfig method Date: Mon, 24 Feb 2020 16:51:40 -0800 Message-Id: <20200225005141.9700-6-inga.stotland@intel.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200225005141.9700-1-inga.stotland@intel.com> References: <20200225005141.9700-1-inga.stotland@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This correctly unpacks configuration dictionary received in the UpdateModelConfig() method --- test/test-mesh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/test-mesh b/test/test-mesh index 929e28fd3..6a5ddbd17 100755 --- a/test/test-mesh +++ b/test/test-mesh @@ -554,7 +554,7 @@ class Element(dbus.service.Object): def set_model_config(self, configs): for config in configs: mod_id = config[0] - self.UpdateModelConfiguration(mod_id, config[1]) + self.update_model_config(mod_id, config[1]) @dbus.service.method(MESH_ELEMENT_IFACE, in_signature="qqvay", out_signature="") @@ -575,6 +575,11 @@ class Element(dbus.service.Object): in_signature="qa{sv}", out_signature="") def UpdateModelConfiguration(self, model_id, config): + cfg = unwrap(config) + print(cfg) + self.update_model_config(model_id, cfg) + + def update_model_config(self, model_id, config): print(('Update Model Config '), end='') print(format(model_id, '04x')) for model in self.models: @@ -644,11 +649,11 @@ class Model(): def print_subscriptions(self, subscriptions): for sub in subscriptions: if isinstance(sub, int): - print('%04x' % sub, end=' ') + print('%04x,' % sub, end=' ') if isinstance(sub, list): label = uuid.UUID(bytes=b''.join(sub)) - print(label, end=' ') + print(label, ',', end=' ') ######################## # On Off Server Model -- 2.21.1