mirror of
https://github.com/httpie/cli.git
synced 2024-12-25 15:58:59 +01:00
Removed accidentally included old funky code.
This commit is contained in:
parent
c29981c633
commit
16df8848e8
@ -32,20 +32,6 @@ class ParseError(Exception):
|
||||
|
||||
KeyValue = namedtuple('KeyValue', ['key', 'value', 'sep', 'orig'])
|
||||
|
||||
def find_separator(string, sep, depth = 1):
|
||||
for i in range(depth):
|
||||
loc = string.find(sep)
|
||||
if loc != -1:
|
||||
# check if previous char is escape char
|
||||
possible_escape = loc - 1
|
||||
if possible_escape <= 0 or string[possible_escape] != '\\':
|
||||
return loc
|
||||
else:
|
||||
# remove the escape char
|
||||
string = string.replace('\\' + sep, sep, 1)
|
||||
return find_separator(string, sep, depth + 1)
|
||||
|
||||
|
||||
class KeyValueType(object):
|
||||
"""A type used with `argparse`."""
|
||||
def __init__(self, *separators):
|
||||
|
Loading…
Reference in New Issue
Block a user