Skip to contentSkip to conversation

test: Fix syntax in bluezutils.py

PATCH In review Frédéric Danis 2 participants 2 messages Dec 6, 2012 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test: Fix syntax in bluezutils.py

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(-)
test/bluezutils.py +2 -2
index d0c4773..de08cbd 100644
@@ -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")
Signature · 1 line
1.7.9.5
#1 lore raw

Hi,

Quoted 16 lines · Frédéric Danis

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(-)
test/bluezutils.py +0 -0
index d0c4773..de08cbd 100644

test/bluezutils.py def find_adapter_in_objects(objects, pattern=None): · line 23

Quoted 7 lines
test/bluezutils.py +2 -2
@@ -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):

Ack.

Cheers,

Signature · 1 line
Vinicius