Remove unused function _underscore().
parent
3152784ada
commit
f65618bd83
19
gnupg.py
19
gnupg.py
|
@ -649,25 +649,6 @@ def _threaded_copy_data(instream, outstream):
|
|||
wr.start()
|
||||
return wr
|
||||
|
||||
def _underscore(input, remove_prefix=False):
|
||||
"""
|
||||
Change hyphens to underscores so that GPG option names can be easily
|
||||
tranlated to object attributes.
|
||||
|
||||
:type input: C{str}
|
||||
:param input: The input intended for the gnupg process.
|
||||
|
||||
:type remove_prefix: C{bool}
|
||||
:param remove_prefix: If True, strip leading hyphens from the input.
|
||||
|
||||
:rtype: C{str}
|
||||
:return: The :param:input with hyphens changed to underscores.
|
||||
"""
|
||||
if not remove_prefix:
|
||||
return input.replace('-', '_')
|
||||
else:
|
||||
return input.lstrip('-').replace('-', '_')
|
||||
|
||||
def _which(executable, flags=os.X_OK):
|
||||
"""Borrowed from Twisted's :mod:twisted.python.proutils .
|
||||
|
||||
|
|
Loading…
Reference in New Issue