diff options
author | Daniel Firth <dan.firth@codethink.co.uk> | 2016-10-11 14:53:05 +0100 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2016-10-13 12:41:25 +0100 |
commit | a396e9b85191ae97f0242e47075c063f5b7e5c86 (patch) | |
tree | d383c945031553cd4abf4dac76c09cae481e9069 | |
parent | 38af496ddf5c77adc635e07094570d0aad3e42e0 (diff) | |
download | ybd-jjardon/py3.tar.gz |
pep8jjardon/py3
-rw-r--r-- | ybd/cache.py | 3 | ||||
-rw-r--r-- | ybd/release_note.py | 3 | ||||
-rw-r--r-- | ybd/utils.py | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/ybd/cache.py b/ybd/cache.py index 2332440..c37d790 100644 --- a/ybd/cache.py +++ b/ybd/cache.py @@ -90,7 +90,8 @@ def hash_factors(dn): hash_factors[factor] = cache_key(factor) for factor in dn.get('contents', []): - hash_factors[list(factor.keys())[0]] = cache_key(list(factor.keys())[0]) + key = list(factor.keys())[0] + hash_factors[key] = cache_key(key) relevant_factors = ['tree', 'submodules'] + app.defs.defaults.build_steps if app.config.get('artifact-version', False) not in range(0, 6): diff --git a/ybd/release_note.py b/ybd/release_note.py index 90ee791..68d20fd 100644 --- a/ybd/release_note.py +++ b/ybd/release_note.py @@ -20,7 +20,8 @@ import tempfile from ybd import app from ybd.app import chdir, config, log from ybd.morphs import Morphs -from ybd.repos import explore, get_last_tag, get_repo_name, mirror, mirror_has_ref +from ybd.repos import explore, get_last_tag, get_repo_name +from ybd.repos import mirror, mirror_has_ref def do_release_note(release_note): diff --git a/ybd/utils.py b/ybd/utils.py index 8fe4b30..c2d339d 100644 --- a/ybd/utils.py +++ b/ybd/utils.py @@ -210,9 +210,9 @@ def copy_file_list(srcpath, destpath, filelist): ''' def _copyfun(inpath, outpath): - with open(inpath, "r", encoding='utf-8', errors='ignore') as infh: - with open(outpath, "w", encoding='utf-8', errors='ignore') as outfh: - shutil.copyfileobj(infh, outfh, 1024*1024*4) + with open(inpath, "r", encoding='utf-8', errors='ignore') as inf: + with open(outpath, "w", encoding='utf-8', errors='ignore') as outf: + shutil.copyfileobj(inf, outf, 1024*1024*4) shutil.copystat(inpath, outpath) _process_list(srcpath, destpath, filelist, _copyfun) |