Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3975747ybv; Tue, 25 Feb 2020 10:44:49 -0800 (PST) X-Google-Smtp-Source: APXvYqywTgs4tkJUAANc9CDKPblnkSDrEvm61KGM7vhiYDu6fPeoJdPvNVM+WRbOViD+YUZ4LURr X-Received: by 2002:a9d:7c9a:: with SMTP id q26mr9231otn.206.1582656289446; Tue, 25 Feb 2020 10:44:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582656289; cv=none; d=google.com; s=arc-20160816; b=IcdlKBYiE9h9ABYjmK67Q3ZxMS9xK8vsXorgKqpBumMF+45bRlgnq2CHaFLWYzuega AND/dAcBAt/zsSu8I5jDx15Jsm+r6H0XmhR6LzwunhAwAiio0OZLfH2ZqABY3Mx+qVL4 Jj6WI/96rmCVldQ1K+4s95rpj1KkgRXx+SqzC8TtkJuoLDsJMf6zKGZtPS2B8WbFbtPR KZzyJZA9KCt4RujzOSe0E2AKJ7QcB4XlgQ4NJTHfD4oCzu9qsYe0Uo2Tco3dp2zdhGWz 9dgO/boI6W3jOXMJMtC/54YpD8NdA4aB1ivmCKbAW1utPZORa868/fny+6PyOZYPPvvT Zn2Q== 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=0wpmfOSw/OsmlgNsc9DsMWZ29roDLIChQ9FRBtPIESjEPPhOsbWQC/2LOO2pKDlqzh 30OoGcuVugs35LI6FFmTZoTljmAcElW0yQCOAxikgdIiqoKemueyFRhjErTXmRxtHzcT md6SOJI+B7WcOLSbjPmAHKXe1oUhDvEB8XzQimMJm5QI82joeKxZWzl0s2ks7lcOrrmL S+jOjxBLSmM9leiMfHnDtorfS3QXeYsUKCKP5GDbDvvGJ8yFVdhaUHzwGpZa6svI6dbQ LqEOd5/dfLdEyBlM1Nnu4ImnrWvq2GKkFeoUrJnwN4/XsIf5iuHE1vE6XqZ4kko+yJU0 T8rw== 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 k1si36343otn.181.2020.02.25.10.44.33; Tue, 25 Feb 2020 10:44:49 -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 S1731403AbgBYSoZ (ORCPT + 99 others); Tue, 25 Feb 2020 13:44:25 -0500 Received: from mga09.intel.com ([134.134.136.24]:29708 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731611AbgBYSoY (ORCPT ); Tue, 25 Feb 2020 13:44:24 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2020 10:44:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,485,1574150400"; d="scan'208";a="231546560" Received: from ingas-nuc1.sea.intel.com ([10.254.39.252]) by fmsmga008.fm.intel.com with ESMTP; 25 Feb 2020 10:44:23 -0800 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ v3 6/6] test/test-mesh: Fix output og UpdateModelConfig method Date: Tue, 25 Feb 2020 10:44:18 -0800 Message-Id: <20200225184418.12660-7-inga.stotland@intel.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200225184418.12660-1-inga.stotland@intel.com> References: <20200225184418.12660-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