Re: [mat-dev] [pkg-mat] Bug#719140: Bug#719140: Bug#719140: …

Nachricht löschen

Nachricht beantworten
Autor: jvoisin
Datum:  
To: 719140
CC: mat-dev
Alte Treads: Re: [mat-dev] Bug#719140: [pkg-mat] Bug#719140: (no subject)
Betreff: Re: [mat-dev] [pkg-mat] Bug#719140: Bug#719140: Bug#719140: (no subject)
On 06/10/2013 16:45, intrigeri wrote:
> jvoisin wrote (06 Oct 2013 14:58:46 GMT) :
>> I think that Michael's bug is triggered by my exiftool's existence
>> checking (MAT uses exiftool if installed). To do so, MAT calls exiftool,
>> and if this call fails, it assumes that exiftool is not installed.
>
> There's surely a nicer way to detect if a program is in the path,
> isn't it?

Not really :/
shutil.which() is only available in Python 3.3

I could use subprocess.check_call, but it is just another wrapper to
subprocess.Popen as subprocess.check_output is.

But I'll be happy to know that there is a better way, since I also find
that this way is lame.