##// END OF EJS Templates
svn-support: Use utf-8 to encode mod_dav_svn configuration before writing to disk....
Martin Bornhold -
r830:7ca2d1db default
parent child Browse files
Show More
@@ -18,6 +18,7 b''
18 # RhodeCode Enterprise Edition, including its added features, Support services,
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
20
21 import codecs
21 import logging
22 import logging
22 import os
23 import os
23
24
@@ -79,8 +80,9 b' def _write_mod_dav_svn_config(config, fi'
79 Write mod_dav_svn config to file. Log on exceptions but do not raise.
80 Write mod_dav_svn config to file. Log on exceptions but do not raise.
80 """
81 """
81 try:
82 try:
82 with open(filepath, 'w') as file_:
83 with codecs.open(filepath, 'w', encoding='utf-8') as f:
83 file_.write(config)
84 f.write(config)
84 except Exception:
85 except Exception:
85 log.exception(
86 log.exception(
86 'Can not write mod_dav_svn configuration to "%s"', filepath)
87 'Exception while writing mod_dav_svn configuration to '
88 '"%s"', filepath)
General Comments 0
You need to be logged in to leave comments. Login now