diff --git a/lib/core/common.py b/lib/core/common.py index 24bb4f37a..142d29715 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1345,7 +1345,7 @@ def getFileItems(filename, commentPrefix='#', unicode_=True): line = line.strip() if not unicode_: try: - str.encode(line) + line = str.encode(line) except UnicodeDecodeError: continue if line: