aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-02-12 21:25:45 +0100
committerAnton Khirnov <anton@khirnov.net>2022-02-12 21:25:45 +0100
commit5a29d3e4c45bf58153ec1e617a1787b2311724dd (patch)
tree80f17113b91abb865987f6fdc829f7eb24f3dce6
parent723015f39c9c5f2e65e27aff41ba0360d175fbea (diff)
uinput_mng: tweak logging
Remove superfluous newlines.
-rwxr-xr-xuinput_mng11
1 files changed, 6 insertions, 5 deletions
diff --git a/uinput_mng b/uinput_mng
index e349a9a..e8e67a2 100755
--- a/uinput_mng
+++ b/uinput_mng
@@ -42,9 +42,10 @@ class Controller:
return self._file.fileno()
def process(self, sel_key):
- self._logger.debug('Processing commands')
for line in self._file:
cmd, _, rest = line.rstrip('\n').partition(' ')
+ self._logger.debug('Processing command: %s %s', cmd, rest)
+
if cmd == 'add':
self._in_devices.add(rest)
elif cmd == 'remove':
@@ -71,7 +72,7 @@ class UInputDevice:
desc = json.load(f)
if not 'linux-evdev-device-desc' in desc:
- raise ValueError('device_desc is not a valid device description\n')
+ raise ValueError('device_desc is not a valid device description')
if desc['linux-evdev-device-desc'] > 0:
raise ValueError('Unsupported device description version: %d' % desc['linux-evdev-device-desc'])
@@ -85,7 +86,7 @@ class UInputDevice:
product = desc['info']['product'],
version = desc['info']['version'],
bustype = desc['info']['bustype'])
- self._logger.info('Created UInput device "%s": %s\n' % (self._dev.name, self._dev.device.path))
+ self._logger.info('Created UInput device "%s": %s' % (self._dev.name, self._dev.device.path))
def __str__(self):
return 'UInputDevice'
@@ -321,9 +322,9 @@ with contextlib.ExitStack() as stack:
sel.register(uinput, selectors.EVENT_READ)
while True:
- logger.debug('polling\n')
+ logger.debug('polling')
events = sel.select()
- logger.debug('got events:\n')
+ logger.debug('got events:')
for key, mask in events:
tgt = key.data if key.data else key.fileobj
try: