mirror of https://github.com/scrapy/scrapy.git
removed location_str function incorrectly added to this module
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40270
This commit is contained in:
parent
dbfc6341c2
commit
6637d8cf68
|
|
@ -176,13 +176,3 @@ def extract_regex(regex, text, encoding):
|
|||
return [remove_entities(s, keep=['lt', 'amp']) for s in strings]
|
||||
else:
|
||||
return [remove_entities(unicode(s, encoding), keep=['lt', 'amp']) for s in strings]
|
||||
|
||||
_regex_type = type(re.compile("", 0))
|
||||
|
||||
def location_str(location):
|
||||
"""Return a human friendly representation of a parser location"""
|
||||
|
||||
if isinstance(location, _regex_type):
|
||||
return "(regex) " + location.pattern
|
||||
else:
|
||||
return location
|
||||
|
|
|
|||
Loading…
Reference in New Issue