def get_current_status(self):
        p = Popen("%s freeze | grep ^%s==" % (self.pip_binary_path, self.resource.package_name), stdout=PIPE, stderr=STDOUT, shell=True)
        out = p.communicate()[0]
        res = p.wait()
        if res != 0:
            self.current_version = None
        else:
            try:
                self.current_version = out.split("==", 1)[1].strip()
            except __HOLE__:
                raise Fail("pip could not determine installed package version.")
dataset/ETHPy150Open samuel/kokki/kokki/cookbooks/pip/libraries/providers.py/PipPackageProvider.get_current_status