mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-20 07:54:01 +01:00
Don't replace text for Nonetype in helpers.replace_all
This commit is contained in:
@@ -144,6 +144,10 @@ def mb_to_bytes(mb_str):
|
|||||||
return int(float(result.group(1))*1048576)
|
return int(float(result.group(1))*1048576)
|
||||||
|
|
||||||
def replace_all(text, dic):
|
def replace_all(text, dic):
|
||||||
|
|
||||||
|
if not text:
|
||||||
|
return ''
|
||||||
|
|
||||||
for i, j in dic.iteritems():
|
for i, j in dic.iteritems():
|
||||||
text = text.replace(i, j)
|
text = text.replace(i, j)
|
||||||
return text
|
return text
|
||||||
|
|||||||
Reference in New Issue
Block a user