Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_metadata(egg_rel):
""" fetch_metadata
egg_rel.fetch_metadata() should do this, but seems to be broken"""
egg_rel.download()
tmp_path = egg_rel.unpack()
sub_dir = os.listdir(tmp_path)[0]
return Metadata(os.path.join(tmp_path, sub_dir, "PKG-INFO"))
def get_metadata(egg_rel):
""" fetch_metadata
egg_rel.fetch_metadata() should do this, but seems to be broken"""
egg_rel.download()
tmp_path = egg_rel.unpack()
sub_dir = os.listdir(tmp_path)[0]
return Metadata(os.path.join(tmp_path, sub_dir, "PKG-INFO"))