#NEWLINE# def get_current_status( self ) : #NEWLINE# #INDENT# p = Popen ( ( '%s freeze | grep ^%s==' % ( self . pip_binary_path , self . resource . package_name ) ) , stdout = PIPE , stderr = STDOUT , shell = True ) #NEWLINE# out = p . communicate ( ) [ 0 ] #NEWLINE# res = p . wait ( ) #NEWLINE# if ( res != 0 ) : #NEWLINE# #INDENT# self . current_version = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . current_version = out . split ( '==' , 1 ) [ 1 ] . strip ( ) #NEWLINE# #UNINDENT# except IndexError : #NEWLINE# #INDENT# raise Fail ( 'pip could not determine installed package version.' )