We already have a src_repo from the with statement, no need to
instantiate another one (that won't even be closed properly).
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
with dest_repo as dest_repo:
with LocalRepo(repo_dir=src_dir) as src_repo:
with dest_repo.new_packwriter(compression_level=opt.compress) as writer:
-
- src_repo = LocalRepo(repo_dir=src_dir)
-
# Resolve and validate all sources and destinations,
# implicit or explicit, and do it up-front, so we can
# fail before we start writing (for any obviously