ui: don't complain for receivers in other seats
This commit is contained in:
parent
97fa7de28a
commit
b7e8e646b5
|
|
@ -1,3 +1,6 @@
|
||||||
|
New:
|
||||||
|
* Don't complain for receivers that are for other seats
|
||||||
|
|
||||||
1.0.2rc2:
|
1.0.2rc2:
|
||||||
* Remove packaging directory tree as it is not maintained
|
* Remove packaging directory tree as it is not maintained
|
||||||
* Pip installs udev rule and solaar autostart when doing install without --user flag
|
* Pip installs udev rule and solaar autostart when doing install without --user flag
|
||||||
|
|
|
||||||
|
|
@ -343,4 +343,13 @@ def _process_receiver_event(action, device_info):
|
||||||
_start(device_info)
|
_start(device_info)
|
||||||
except OSError:
|
except OSError:
|
||||||
# permission error, ignore this path for now
|
# permission error, ignore this path for now
|
||||||
_error_callback('permissions', device_info.path)
|
# If receiver has extended ACL but not writable then it is for another seat.
|
||||||
|
# (It would be easier to use pylibacl but adding the pylibacl dependencies
|
||||||
|
# for this special case is not good.)
|
||||||
|
try:
|
||||||
|
import subprocess, re
|
||||||
|
output = subprocess.check_output(['/usr/bin/getfacl', '-p', device_info.path])
|
||||||
|
if not re.search(b'user:.+:',output) :
|
||||||
|
_error_callback('permissions', device_info.path)
|
||||||
|
except:
|
||||||
|
_error_callback('permissions', device_info.path)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue