citruz / beacontools

A Python beacon scanning library.
MIT License
159 stars 59 forks source link

Add quotes in the output of the which commando, otherwise readlink st… #53

Closed cleitonbueno closed 4 years ago

cleitonbueno commented 4 years ago

Add quotes in the output of the which command, otherwise readlink stop in the first space in the path.

cleitonbueno commented 4 years ago
/tmp/env test $ virtualenv --python=python3 .env
/tmp/env test $ source .env/bin/activate
/tmp/env test $ pip3 install beacontools
Collecting beacontools
  Using cached beacontools-2.0.2-py2.py3-none-any.whl (25 kB)
Collecting ahocorapy==1.6.1
  Using cached ahocorapy-1.6.1-py2.py3-none-any.whl (8.3 kB)
Installing collected packages: construct, future, ahocorapy, beacontools
Successfully installed ahocorapy-1.6.1 beacontools-2.0.2 construct-2.10.54 future-0.18.2
/tmp/env test $ pip3 install PyBluez
Installing collected packages: PyBluez
Successfully installed PyBluez-0.23

Test command:

/tmp/env test $ sudo setcap 'cap_net_raw,cap_net_admin+eip' $(readlink -f $(which python))
Failed to set capabilities on file `/tmp/env' (Invalid argument)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file

/tmp/env test $ sudo setcap 'cap_net_raw,cap_net_admin+eip' "$(readlink -f "$(which python)")"
/tmp/env test $
coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 87.984% when pulling 9d487d6211450c31b6efee0694aafb34593aadc7 on cleitonbueno:fix-readlink into 2fb645f86165b29e74c9b750449f80bee1000704 on citruz:master.

citruz commented 4 years ago

Thanks!