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

Re: find-work script no longer working on stable

On Tue, Aug 09, 2016 at 06:50:47PM +0100, Chris Lamb wrote:
> > try:
> >     import requests
> > except ImportError:
> >     sys.stderr.puts("You need to install python3-requests")
> >     sys.exit(1)
> This seems unnecessary; ``requests`` was always required, it would make
> the behaviour inconsistent with all the other scripts which also have

It's also inconsistent to have some using Python2 and others Python3 so

> dependencies that are in other packages, its Debian-specific, and
> aesthetically unpleasing to do this.

Aesthetically unpleasing is that we have requirements in documentation
instead of having the software tell us right away but I won't push this.

> Besides, more idiomatic is
>     print("You need to install python3-requests", file=sys.stderr)

sys.stderr.puts has the same syntax in python2 and python3 out of the
box while print doesn't.
 -- Guido

Reply to: