diff mbox series

[1/1] utils/scanpypi: increase error message verbosity

Message ID 20171218140016.13774-1-alexey.roslyakov@gmail.com
State Accepted
Headers show
Series [1/1] utils/scanpypi: increase error message verbosity | expand

Commit Message

Alexey Roslyakov Dec. 18, 2017, 2 p.m. UTC
When package installation fails it is good to know what happened.

Signed-off-by: Alexey Roslyakov <alexey.roslyakov@gmail.com>
---
 utils/scanpypi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Yegor Yefremov Dec. 18, 2017, 2:16 p.m. UTC | #1
Hi Alexey,

On Mon, Dec 18, 2017 at 3:00 PM, Alexey Roslyakov
<alexey.roslyakov@gmail.com> wrote:
> When package installation fails it is good to know what happened.
>
> Signed-off-by: Alexey Roslyakov <alexey.roslyakov@gmail.com>

Nice catch.

Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>

Yegor

> ---
>  utils/scanpypi | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/utils/scanpypi b/utils/scanpypi
> index 02384f2569..939c26a187 100755
> --- a/utils/scanpypi
> +++ b/utils/scanpypi
> @@ -608,9 +608,9 @@ def main():
>                  else:
>                      raise
>                  continue
> -            except AttributeError:
> -                print('Error: Could not install package {pkg}'.format(
> -                    pkg=package.real_name))
> +            except AttributeError as error:
> +                print('Error: Could not install package {pkg}: {error}'.format(
> +                    pkg=package.real_name, error=error))
>                  continue
>
>              # Package requirement are an argument of the setup function
> --
> 2.13.6
>
Thomas Petazzoni Dec. 18, 2017, 2:19 p.m. UTC | #2
Hello,

On Mon, 18 Dec 2017 21:00:16 +0700, Alexey Roslyakov wrote:
> When package installation fails it is good to know what happened.
> 
> Signed-off-by: Alexey Roslyakov <alexey.roslyakov@gmail.com>
> ---
>  utils/scanpypi | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied to master, thanks.

Thomas
Yegor Yefremov Dec. 18, 2017, 2:56 p.m. UTC | #3
On Mon, Dec 18, 2017 at 3:19 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Mon, 18 Dec 2017 21:00:16 +0700, Alexey Roslyakov wrote:
>> When package installation fails it is good to know what happened.
>>
>> Signed-off-by: Alexey Roslyakov <alexey.roslyakov@gmail.com>
>> ---
>>  utils/scanpypi | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> Applied to master, thanks.

@Alexey do you have more scanpypi patches in the queue? I've reworked
the license type detection [1]. I'd also like to add licence file
checksum to the *.hash file creation.

[1] http://patchwork.ozlabs.org/patch/837807/

Yegor
Alexey Roslyakov Dec. 18, 2017, 5:50 p.m. UTC | #4
Yegor,
no, I don't have anything at the moment.

All best.

On 18 December 2017 at 21:56, Yegor Yefremov <yegorslists@googlemail.com>
wrote:

> On Mon, Dec 18, 2017 at 3:19 PM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
> > Hello,
> >
> > On Mon, 18 Dec 2017 21:00:16 +0700, Alexey Roslyakov wrote:
> >> When package installation fails it is good to know what happened.
> >>
> >> Signed-off-by: Alexey Roslyakov <alexey.roslyakov@gmail.com>
> >> ---
> >>  utils/scanpypi | 6 +++---
> >>  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > Applied to master, thanks.
>
> @Alexey do you have more scanpypi patches in the queue? I've reworked
> the license type detection [1]. I'd also like to add licence file
> checksum to the *.hash file creation.
>
> [1] http://patchwork.ozlabs.org/patch/837807/
>
> Yegor
>
diff mbox series

Patch

diff --git a/utils/scanpypi b/utils/scanpypi
index 02384f2569..939c26a187 100755
--- a/utils/scanpypi
+++ b/utils/scanpypi
@@ -608,9 +608,9 @@  def main():
                 else:
                     raise
                 continue
-            except AttributeError:
-                print('Error: Could not install package {pkg}'.format(
-                    pkg=package.real_name))
+            except AttributeError as error:
+                print('Error: Could not install package {pkg}: {error}'.format(
+                    pkg=package.real_name, error=error))
                 continue
 
             # Package requirement are an argument of the setup function