summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Firth <dan.firth@codethink.co.uk>2016-11-29 13:01:55 +0000
committerDaniel Firth <dan.firth@codethink.co.uk>2016-11-29 13:01:55 +0000
commitf5b6a1ad1c1ba3dbdc439d33f564312d9baf77b9 (patch)
treec3c594ff849b8169eb4eb1952cd7358686d9ec31
parent93915a4f6b3a97044ba5e3420e19c8ec89473557 (diff)
downloadybd-f5b6a1ad1c1ba3dbdc439d33f564312d9baf77b9.tar.gz
Revert "pep8"
This reverts commit 68de1876b1dce7a10065d700716221bec9cf9e3a.
-rw-r--r--ybd/cache.py3
-rw-r--r--ybd/release_note.py3
-rw-r--r--ybd/utils.py6
3 files changed, 5 insertions, 7 deletions
diff --git a/ybd/cache.py b/ybd/cache.py
index c37d790..2332440 100644
--- a/ybd/cache.py
+++ b/ybd/cache.py
@@ -90,8 +90,7 @@ def hash_factors(dn):
hash_factors[factor] = cache_key(factor)
for factor in dn.get('contents', []):
- key = list(factor.keys())[0]
- hash_factors[key] = cache_key(key)
+ hash_factors[list(factor.keys())[0]] = cache_key(list(factor.keys())[0])
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 68d20fd..90ee791 100644
--- a/ybd/release_note.py
+++ b/ybd/release_note.py
@@ -20,8 +20,7 @@ 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
-from ybd.repos import mirror, mirror_has_ref
+from ybd.repos import explore, get_last_tag, get_repo_name, mirror, mirror_has_ref
def do_release_note(release_note):
diff --git a/ybd/utils.py b/ybd/utils.py
index c2d339d..8fe4b30 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 inf:
- with open(outpath, "w", encoding='utf-8', errors='ignore') as outf:
- shutil.copyfileobj(inf, outf, 1024*1024*4)
+ 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)
shutil.copystat(inpath, outpath)
_process_list(srcpath, destpath, filelist, _copyfun)