jbaiter / gphoto2-cffi

Python bindings for libgphoto2 with an idiomatic API
GNU Lesser General Public License v3.0
37 stars 16 forks source link

Fix an error if there are no devices plugged in for `list_cameras()` #28

Closed define-private-public closed 7 years ago

define-private-public commented 7 years ago

re.match() will return a None if it doesn't find any matches. So calling None.groups() will result in an error. This change will skip that iteration if it doesn't find any matches.