def get_version(self, dependency):
        """Return the installed version parsing the output of 'pip show'."""
        logger.debug("getting installed version for %s", dependency)
        stdout = helpers.logged_exec([self.pip_exe, "show", str(dependency)])
        version = [line for line in stdout if line.startswith('Version:')]
        if len(version) == 1:
            version = version[0].strip().split()[1]
            logger.debug("Installed version of %s is: %s", dependency, version)
            return version
        else:
            logger.error('Fades is having problems getting the installed version. '
                         'Run with -v or check the logs for details')
            return ''
def get_version ( self , dependency ) : logger . debug ( "getting installed version for %s" , dependency ) stdout = helpers . logged_exec ( [ self . pip_exe , "show" , str ( dependency ) ] ) version = [ line for line in stdout if line . startswith ( 'Version:' ) ] if len ( version ) == 1 : version = version [ 0 ] . strip ( ) . split ( ) [ 1 ] logger . debug ( "Installed version of %s is: %s" , dependency , version ) return version else : logger . error ( 'Fades is having problems getting the installed version. ' 'Run with -v or check the logs for details' ) return ''
Return the installed version parsing the output of 'pip show'.