2012-12-06 20:13:00

by Vinicius Costa Gomes

[permalink] [raw]
Subject: [PATCH BlueZ] test: Fix syntax in bluezutils.py

From: Frédéric Danis <[email protected]>

Traceback (most recent call last):
File "./simple-agent", line 12, in <module>
import bluezutils
File "/home/fdanis/src/bluez/test/bluezutils.py", line 22
if not pattern or pattern == adapter["Address"] or
^
SyntaxError: invalid syntax
---
test/bluezutils.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/bluezutils.py b/test/bluezutils.py
index d0c4773..de08cbd 100644
--- a/test/bluezutils.py
+++ b/test/bluezutils.py
@@ -19,8 +19,8 @@ def find_adapter_in_objects(objects, pattern=None):
adapter = ifaces.get(ADAPTER_INTERFACE)
if adapter is None:
continue
- if not pattern or pattern == adapter["Address"] or
- path.endswith(pattern)):
+ if not pattern or pattern == adapter["Address"] or \
+ path.endswith(pattern):
obj = bus.get_object(SERVICE_NAME, path)
return dbus.Interface(obj, ADAPTER_INTERFACE)
raise Exception("Bluetooth adapter not found")
--
1.8.0.1



2012-12-06 20:26:57

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH BlueZ] test: Fix syntax in bluezutils.py

Hi,

On Thu, Dec 06, 2012, Vinicius Costa Gomes wrote:
> Traceback (most recent call last):
> File "./simple-agent", line 12, in <module>
> import bluezutils
> File "/home/fdanis/src/bluez/test/bluezutils.py", line 22
> if not pattern or pattern == adapter["Address"] or
> ^
> SyntaxError: invalid syntax
> ---
> test/bluezutils.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Applied. Thanks.

Johan