diff options
author | Martin Pitt <martinpitt@gnome.org> | 2013-07-24 15:04:10 +0200 |
---|---|---|
committer | Martin Pitt <martinpitt@gnome.org> | 2013-07-24 15:04:10 +0200 |
commit | 3192bcd477e2acd6e2a612d198b2e65ed98e8dcd (patch) | |
tree | 691f3e4636074e4a2e55e3d539d9dbafaeb8c3ea | |
parent | 88373f198f295bbdd5820006ffcfd5b0876bc5e2 (diff) |
mpi2hwdb.py: Fix indentation
-rwxr-xr-x | tools/mpi2hwdb.py | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/tools/mpi2hwdb.py b/tools/mpi2hwdb.py index 1e03e1e..ed6efcf 100755 --- a/tools/mpi2hwdb.py +++ b/tools/mpi2hwdb.py @@ -58,24 +58,23 @@ def parse_mpi(mpi): usbids[vid] = [ pid ] for vid, pids in usbids.items(): - for pid in pids: - block += 'usb:v%sp%s*\n' % (vid.upper(), pid.upper()) - block += ' ID_MEDIA_PLAYER=%s\n' % os.path.splitext(os.path.basename(mpi))[0] + for pid in pids: + block += 'usb:v%sp%s*\n' % (vid.upper(), pid.upper()) + block += ' ID_MEDIA_PLAYER=%s\n' % os.path.splitext(os.path.basename(mpi))[0] - # do we have an icon? - try: - icon = cp.get('Device', 'icon') - # breaks media player detection : https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/657609 - #print ' UDISKS_PRESENTATION_ICON_NAME=%s\n' % icon, - except configparser.NoOptionError: - pass + # do we have an icon? + try: + icon = cp.get('Device', 'icon') + # breaks media player detection : https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/657609 + #print ' UDISKS_PRESENTATION_ICON_NAME=%s\n' % icon, + except configparser.NoOptionError: + pass - # empty line between blocks - block += '\n' - - # write bytes so that we are independent of the locale - os.write(sys.stdout.fileno(), block.encode('UTF-8')) + # empty line between blocks + block += '\n' + # write bytes so that we are independent of the locale + os.write(sys.stdout.fileno(), block.encode('UTF-8')) except configparser.NoOptionError: pass |