Re: [virt-bootstrap] [PATCH 1/3] utils: Add is_installed function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/21/2017 05:37 AM, Cedric Bosdonnat wrote:
> On Wed, 2017-11-01 at 00:19 +0000, Radostin Stoyanov wrote:
>> Add utility function to check whether an executable is available in
>> the PATH env variable.
>> ---
>>  src/virtBootstrap/utils.py | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/src/virtBootstrap/utils.py b/src/virtBootstrap/utils.py
>> index 84d1629..2bd7873 100644
>> --- a/src/virtBootstrap/utils.py
>> +++ b/src/virtBootstrap/utils.py
>> @@ -32,6 +32,7 @@ import subprocess
>>  import sys
>>  import tempfile
>>  import logging
>> +from distutils.spawn import find_executable
>>  
> 
> What annoys me with this approach is that it will add a runtime dependency
> on distutils. as virtBootstrap is not meant to run on a non-linux platform
> couldn't we just call the 'which' tool to do the job?

Isn't distutils part of the python standard library? Shouldn't need any
non-standard dependency AFAIK

https://docs.python.org/3/library/distutils.html
https://docs.python.org/2/library/distutils.html

- Cole

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux