Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment authored Apr 17, 2021
1 parent 392ead7 commit 26db2cd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pipupgrade/commands/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys, os, os.path as osp
import re
import json
import subprocess

# imports - module imports
from pipupgrade.model import Registry
Expand Down Expand Up @@ -305,7 +306,9 @@ def update_registry(registry,
upgrade = True
)
except PopenError as e:
if raise_err:
if(type(e) == subprocess.CalledProcessError):
print(f"Non-zero value returned by pip while updating {package.name}: {e}")
elif raise_err:
raise
else:
cli.echo("%s upto date." % cli_format(stitle, cli.CYAN),
Expand Down Expand Up @@ -386,4 +389,4 @@ def update_pip(pip_exec, user = None, quiet = None, file = None):
cli.echo("%s upto date." % cli_format(pip_exec, cli.CYAN),
file = file)

return output
return output

0 comments on commit 26db2cd

Please sign in to comment.