mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-21 20:29:27 +00: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)
|
||||
|
||||
def replace_all(text, dic):
|
||||
|
||||
if not text:
|
||||
return ''
|
||||
|
||||
for i, j in dic.iteritems():
|
||||
text = text.replace(i, j)
|
||||
return text
|
||||
|
||||
Reference in New Issue
Block a user