[Merge] lp:~vorlon/ddeb-retriever/python3 into lp:ddeb-retriever

Brian Murray brian at ubuntu.com
Tue May 23 19:50:24 UTC 2017


Review: Needs Information

Is there a reason the shebang in ddeb_retriever.py wasn't changed to python3 also?

I also have one nitpicky comment which you can find in-line.

Diff comments:

> 
> === modified file 'ddeb_retriever.py'
> --- ddeb_retriever.py	2017-04-22 23:07:59 +0000
> +++ ddeb_retriever.py	2017-05-18 06:26:31 +0000
> @@ -107,7 +107,14 @@
>              os.makedirs(destdir)
>          except OSError:
>              pass
> -        urllib.urlretrieve(url, dest)
> +        with urllib.request.urlopen(url) as req:
> +            if req.getcode() != 200:
> +                logging.error('URL %s failed with code %u', req.geturl(), code)
> +                return False
> +            response = req.read()
> +        with open (dest, 'wb') as handle:

All of your other opens are "open(" and this one has a space between the "open" and "(". I don't have a preference but would prefer consistency.

> +            handle.write(response)
> +
>          logging.debug('Downloaded %s into %s', ddeb, os.path.dirname(dest))
>  
>      return True


-- 
https://code.launchpad.net/~vorlon/ddeb-retriever/python3/+merge/324233
Your team Ubuntu Package Archive Administrators is requested to review the proposed merge of lp:~vorlon/ddeb-retriever/python3 into lp:ddeb-retriever.



More information about the ubuntu-archive mailing list