Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/deltacode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,8 @@ def determine_moved(self):
added = self.index_deltas('sha1', [i for i in self.deltas if i.old_file is None and i.new_file])
removed = self.index_deltas('sha1', [i for i in self.deltas if i.old_file and i.new_file is None])

# TODO: should it be iteritems() or items()
for added_sha1, added_deltas in added.iteritems():
for removed_sha1, removed_deltas in removed.iteritems():
for added_sha1, added_deltas in added.items():
for removed_sha1, removed_deltas in removed.items():

# check for matching sha1s on both sides
if utils.check_moved(added_sha1, added_deltas, removed_sha1, removed_deltas):
Expand Down
2 changes: 1 addition & 1 deletion src/deltacode/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def print_version(ctx, param, value):
@click.option('--version', is_flag=True, is_eager=True, expose_value=False, callback=print_version, help='Show the version and exit.')
@click.option('-n', '--new', required=True, prompt=False, type=click.Path(exists=True, readable=True), help='Identify the path to the "new" scan file')
@click.option('-o', '--old', required=True, prompt=False, type=click.Path(exists=True, readable=True), help='Identify the path to the "old" scan file')
@click.option('-j', '--json-file', prompt=False, default='-', type=click.File(mode='wb', lazy=False), help='Identify the path to the .json output file')
@click.option('-j', '--json-file', prompt=False, default='-', type=click.File(mode='w', lazy=False), help='Identify the path to the .json output file')
@click.option('-a', '--all-delta-types', is_flag=True, help="Include unmodified files as well as all changed files in the .json output. If not selected, only changed files are included.")
def cli(new, old, json_file, all_delta_types):
"""
Expand Down