@@ -51,8 +51,7 @@ class PipCheckerError(Exception):
5151
5252 def __init__ (self , error_msg : str ):
5353 super (PipCheckerError , self ).__init__ (
54- 'Pip Checker failed, '
55- 'logs are: {error_msg}' .format (error_msg = error_msg ))
54+ 'Pip Checker failed: {error_msg}' .format (error_msg = error_msg ))
5655
5756 self .error_msg = error_msg
5857
@@ -64,18 +63,16 @@ def __init__(self,
6463 error_msg : str ,
6564 command : List [str ],
6665 returncode : int ):
66+ command_string = ' ' .join (shlex .quote (c ) for c in command )
6767 super (PipError , self ).__init__ (
68- 'Pip command ({command }) failed with error [{returncode}]: '
68+ 'Pip command ({command_string }) failed with error [{returncode}]: '
6969 '{error_msg}' .format (
70- command = command , returncode = returncode ,
70+ command_string = command_string , returncode = returncode ,
7171 error_msg = error_msg ))
7272
7373 self .command = command
7474 self .returncode = returncode
75-
76- @property
77- def command_string (self ) -> str :
78- return ' ' .join (shlex .quote (c ) for c in self .command )
75+ self .command_string = command_string
7976
8077
8178@enum .unique
@@ -388,7 +385,7 @@ def _list(self, container):
388385 command ,
389386 stdout = True ,
390387 stderr = False ,
391- raise_on_failure = False )
388+ raise_on_failure = True )
392389
393390 pip_list_result = json .loads (list_all )
394391
@@ -398,7 +395,7 @@ def _list(self, container):
398395 command ,
399396 stdout = True ,
400397 stderr = False ,
401- raise_on_failure = False )
398+ raise_on_failure = True )
402399
403400 pip_list_latest_result = json .loads (list_outdated )
404401
0 commit comments