Skip to content

Commit 654280c

Browse files
committed
Adapted samples for py3 support
1 parent 176066d commit 654280c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

samples/device_manager/device_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
print("Finding device class 'System'")
1616
# Allow devmgr.classes["name"] ?
17-
system_cls = [cls for cls in devmgr.classes if cls.name == "System"][0]
17+
system_cls = [cls for cls in devmgr.classes if cls.name == b"System"][0]
1818
print(" * {0}".format(system_cls))
1919
print(" Enumerating some devices of 'System'")
2020
devices = system_cls.devices.all()

samples/device_manager/enum_devices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
def class_generator(filter=None):
99
for cls in devmgr.classes:
10-
if filter and cls.name != filter:
10+
if filter and cls.name != filter.encode():
1111
continue
1212
yield cls
1313

0 commit comments

Comments
 (0)