Merge with remote:master
This commit is contained in:
commit
b9d13c9e19
1
TODO
1
TODO
|
@ -2,3 +2,4 @@ doc enhancement
|
|||
Limit hits/pages/downloads by rate
|
||||
Automatic tests
|
||||
Free memory as soon as possible
|
||||
Remove some IP from statistics
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
|
||||
# Default configuration
|
||||
|
|
10
iwla.py
10
iwla.py
|
@ -240,11 +240,10 @@ class IWLA(object):
|
|||
# TODO : remove return
|
||||
#return
|
||||
|
||||
with open(filename + '.tmp', 'wb+') as f:
|
||||
with open(filename + '.tmp', 'wb+') as f, gzip.open(filename, 'w') as fzip:
|
||||
pickle.dump(obj, f)
|
||||
f.seek(0)
|
||||
with gzip.open(filename, 'w') as fzip:
|
||||
fzip.write(f.read())
|
||||
fzip.write(f.read())
|
||||
os.remove(filename + '.tmp')
|
||||
|
||||
def _deserialize(self, filename):
|
||||
|
@ -485,9 +484,8 @@ class IWLA(object):
|
|||
|
||||
if not os.path.exists(gz_path) or\
|
||||
os.stat(path).st_mtime > build_time:
|
||||
with open(path, 'rb') as f_in:
|
||||
with gzip.open(gz_path, 'wb') as f_out:
|
||||
f_out.write(f_in.read())
|
||||
with open(path, 'rb') as f_in, gzip.open(gz_path, 'wb') as f_out:
|
||||
f_out.write(f_in.read())
|
||||
|
||||
def _compressFiles(self, build_time, root):
|
||||
if not conf.compress_output_files: return
|
||||
|
|
Loading…
Reference in New Issue
Block a user