diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-06-06 19:23:03 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-06-06 19:23:03 +0200 |
| commit | 6f3eada2c3a5c0a21c9b3fef3bef3f655b0892e4 (patch) | |
| tree | 82d444e6c02f7cb18f41dba24a045ad16d0cd4a4 /addons/hw_scanner/controllers/main.py | |
| parent | 7095cb5af5ddef5e89e2bc1da8add6bfff1ed10e (diff) | |
| parent | f687a27b79e2072ffe0de11722fa8ab1f7c9a6fd (diff) | |
[MERGE] forward port branch saas-15 up to f687a27b79e
Diffstat (limited to 'addons/hw_scanner/controllers/main.py')
| -rw-r--r-- | addons/hw_scanner/controllers/main.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/hw_scanner/controllers/main.py b/addons/hw_scanner/controllers/main.py index a5a3136cec8..fc2724dd31d 100644 --- a/addons/hw_scanner/controllers/main.py +++ b/addons/hw_scanner/controllers/main.py @@ -119,7 +119,10 @@ class Scanner(Thread): def get_devices(self): try: if not evdev: - return None + return [] + + if not os.path.isdir(self.input_dir): + return [] new_devices = [device for device in listdir(self.input_dir) if join(self.input_dir, device) not in [dev.evdev.fn for dev in self.open_devices]] |
