mirror of https://github.com/CIRCL/PyCIRCLean
write logfile as binary, use system packages when possible
parent
2df076aaf9
commit
3efa57f0e2
|
@ -1,9 +1,9 @@
|
|||
language: python
|
||||
|
||||
python:
|
||||
- "2.7"
|
||||
- "2.7_with_system_site_packages"
|
||||
- "3.3"
|
||||
- "3.4"
|
||||
- "3.4_with_system_site_packages"
|
||||
- "3.5"
|
||||
- "nightly"
|
||||
|
||||
|
@ -21,9 +21,6 @@ addons:
|
|||
# Testing dependencies
|
||||
- mercurial
|
||||
|
||||
virtualenv:
|
||||
system_site_packages: true
|
||||
|
||||
install:
|
||||
- pip install -U pip
|
||||
# General dependencies
|
||||
|
|
|
@ -159,7 +159,7 @@ class KittenGroomerBase(object):
|
|||
|
||||
def _computehash(self, path):
|
||||
s = hashlib.sha1()
|
||||
with open(path, 'rb', errors='surrogateescape') as f:
|
||||
with open(path, 'rb') as f:
|
||||
while True:
|
||||
buf = f.read(0x100000)
|
||||
if not buf:
|
||||
|
@ -168,7 +168,7 @@ class KittenGroomerBase(object):
|
|||
return s.hexdigest()
|
||||
|
||||
def tree(self, base_dir, padding=' '):
|
||||
with open(self.log_content, 'a', errors='surrogateescape') as lf:
|
||||
with open(self.log_content, 'ab') as lf:
|
||||
lf.write('#' * 80 + '\n')
|
||||
lf.write('{}+- {}/\n'.format(padding, os.path.basename(os.path.abspath(base_dir))))
|
||||
padding += '| '
|
||||
|
|
Loading…
Reference in New Issue