Skip to content

Commit

Permalink
Bugfix: Manually specifying hidraw device didn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
bseibold committed Jan 13, 2013
1 parent 3496f3b commit 8283a8e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
@@ -1,3 +1,9 @@
tpkbdctl (0.2.3-1) unstable; urgency=low

* Bugfix: Manually specifying hidraw device didn't work

-- unknown <unknown@unknown> Sun, 13 Jan 2012 12:13:18 +0100

tpkbdctl (0.2.2-1) unstable; urgency=low

* Push version because README.rst was missing on PyPi
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@
from setuptools import setup

setup(name='tpkbdctl',
version='0.2.2',
version='0.2.3',
description='Thinkpad Keyboard Control Tool',
long_description=open('README.rst').read(),
url='http://github.com/bseibold/tpkbdctl',
Expand Down
11 changes: 8 additions & 3 deletions tpkbdctl/cmd.py
Expand Up @@ -7,7 +7,7 @@
import sys
import re
from optparse import OptionParser
from tpkbdctl import TpkbdCtl
from tpkbdctl import TpkbdCtl, HidrawDevice

def parse_choice(val):
v = val[0].lower()
Expand Down Expand Up @@ -52,10 +52,15 @@ def main():
if m:
tpkbdctl.probe_device('%04X:17EF:6009.%04X' % (int(m.group(1), 16), int(m.group(2), 16)))
continue

m = re.match('hidraw:(.*)', d)
if m:
tpkbdctl.devices.append(HidrawDevice(str(m.group(1)))) # no validation on purpose
tpkbdctl.devices.append(HidrawDevice('/dev/hidraw{0:s}'.format(m.group(1)))) # no validation on purpose
continue

m = re.match('/dev/hidraw([0-9]+)', d)
if m:
tpkbdctl.devices.append(HidrawDevice('/dev/hidraw{0:s}'.format(m.group(1)))) # no validation on purpose
continue

else:
Expand Down

0 comments on commit 8283a8e

Please sign in to comment.