Replace decode errors when reading device configs.

This commit is contained in:
grossmj committed 2014-05-29 12:59:13 -06:00
1 parent e817c13738
commit 61ef750da3
7 files changed
+11 -11

No files matched your search

+1 -1
View File
@@ -336,7 +336,7 @@ class VPCS(IModule):
if os.path.isfile(request["script_file"]) and request["script_file"] != config_path:
# this is a local file set in the GUI
try:
with open(request["script_file"], "r") as f:
with open(request["script_file"], "r", errors="replace") as f:
config = f.read()
with open(config_path, "w") as f:
config = config.replace("\r", "")