summaryrefslogtreecommitdiffstats
path: root/core/views_survex.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/views_survex.py')
-rw-r--r--core/views_survex.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/views_survex.py b/core/views_survex.py
index f6e692f..c7d980c 100644
--- a/core/views_survex.py
+++ b/core/views_survex.py
@@ -95,7 +95,7 @@ class SvxForm(forms.Form):
if mbeginend.group(1) != mbeginend.group(2):
return "Error: mismatching beginend"
- fout = open(fname, "w")
+ fout = open(fname, "wb")
res = fout.write(rcode.encode("latin1"))
fout.close()
return "SAVED"
@@ -109,7 +109,7 @@ class SvxForm(forms.Form):
fin = open(settings.SURVEX_DATA + self.data['filename'] + ".log", "rb")
log = fin.read()
fin.close()
- log = re.sub("(?s).*?(Survey contains)", "\\1", log)
+ log = re.sub(b"(?s).*?(Survey contains)", "\\1", log)
return log