Skip to content

Commit

Permalink
Remove dead code paths identified by vulture. (#221)
Browse files Browse the repository at this point in the history
* Remove dead code path in Collection.

* Raise errors at the end of copytree.
  • Loading branch information
bdice authored and csadorf committed Aug 29, 2019
1 parent 71aa533 commit 612aa6e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
5 changes: 0 additions & 5 deletions signac/contrib/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,6 @@ def _build_index(docs, key, primary_key):
"Specifically keys with dots ('.').\n\n"
"See https://signac.io/document-wide-migration/ "
"for a recipe on how to replace dots in existing keys.")
# inlined for performance
if type(v) is list: # performance
index[_to_hashable(v)].add(doc[primary_key])
else:
index[v].add(doc[primary_key])
return index


Expand Down
2 changes: 0 additions & 2 deletions signac/syncutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ def copytree(src, dst, copy_function=shutil.copy2, symlinks=False):
else:
copy_function(srcname, dstname)
except OSError as why:
raise
errors.append((srcname, dstname, str(why)))
# catch the Error from the recursive copytree so that we can
# continue with other files
except shutil.Error as err:
raise
errors.extend(err.args[0])
if errors:
raise shutil.Error(errors)
Expand Down

0 comments on commit 612aa6e

Please sign in to comment.