[FIX] hw_scanner: don't try to grab() a non-existing device

This would generate an ERROR entry in the log every 5 seconds as long as
no barcode scanner is plugged in.
This commit is contained in:
Joren Van Onder
2015-08-11 15:17:06 +02:00
committed by Christophe Simonis
parent 59b5f136bf
commit 7c4864e942
+2
View File
@@ -172,6 +172,8 @@ class Scanner(Thread):
else:
time.sleep(5) # wait until a suitable device is plugged
device = self.get_device()
if not device:
continue
try:
device.grab()