mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-03 12:24:46 +00:00
No need to process an empty string in str_format.ascii_safe()
This commit is contained in:
parent
1f77506c9f
commit
7a0644a234
1 changed files with 1 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ def ascii_safe(s):
|
|||
@return: version of s containing only ASCII characters, or None if s was None
|
||||
@rtype: string or None
|
||||
"""
|
||||
if s is not None:
|
||||
if s:
|
||||
s = s.encode('ascii', 'ignore').decode('ascii')
|
||||
return s
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue