File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 10
10
11
11
import redis
12
12
import six
13
- from builtins import object
13
+ from builtins import object , open
14
14
from django .conf import settings
15
15
from django .core .cache import cache
16
16
from httplib2 import Http
@@ -121,10 +121,10 @@ def safe_write(filename, contents):
121
121
dirname = os .path .dirname (filename )
122
122
if not os .path .exists (dirname ):
123
123
os .makedirs (dirname )
124
- with open (filename , 'w' ) as fh :
125
- fh .write (contents .encode ('utf-8' , 'ignore' ))
126
- fh .close ()
127
124
125
+ with open (filename , 'w' , encoding = 'utf-8' , errors = 'ignore' ) as fh :
126
+ fh .write (contents )
127
+ fh .close ()
128
128
129
129
def purge_version (version , mainsite = False , subdomain = False , cname = False ):
130
130
varnish_servers = getattr (settings , 'VARNISH_SERVERS' , None )
You can’t perform that action at this time.
0 commit comments