MCPcopy Create free account
hub / github.com/SecurityInnovation/PGPy / del_uid

Method del_uid

pgpy/pgp.py:1850–1864  ·  view source on GitHub ↗

Find and remove a user id that matches the search string given. This method does not modify the corresponding :py:obj:`~pgpy.PGPUID` object; it only removes it from the list of user ids on the key. :param search: A text string to match name, comment, or email address agains

(self, search)

Source from the content-addressed store, hash-verified

1848 return self.parent.get_uid(search)
1849
1850 def del_uid(self, search):
1851 """
1852 Find and remove a user id that matches the search string given. This method does not modify the corresponding
1853 :py:obj:`~pgpy.PGPUID` object; it only removes it from the list of user ids on the key.
1854
1855 :param search: A text string to match name, comment, or email address against
1856 :type search: ``str``, ``unicode``
1857 """
1858 u = self.get_uid(search)
1859
1860 if u is None:
1861 raise KeyError("uid '{:s}' not found".format(search))
1862
1863 u._parent = None
1864 self._uids.remove(u)
1865
1866 def add_subkey(self, key, **prefs):
1867 """

Callers 2

test_fail_del_uidMethod · 0.80
test_remove_altuidMethod · 0.80

Calls 1

get_uidMethod · 0.95

Tested by 2

test_fail_del_uidMethod · 0.64
test_remove_altuidMethod · 0.64