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
|
||||
|
|
6
iwla.py
6
iwla.py
|
@ -240,10 +240,9 @@ 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())
|
||||
os.remove(filename + '.tmp')
|
||||
|
||||
|
@ -485,8 +484,7 @@ 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:
|
||||
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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user