Skip to content

Commit

Permalink
Fix iterating over manifest (#3792)
Browse files Browse the repository at this point in the history
* Fix

* Update CHANGELOG

Co-authored-by: Nikita Manovich <nikita.manovich@intel.com>
  • Loading branch information
Marishka17 and Nikita Manovich authored Oct 15, 2021
1 parent 584392a commit b657113
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Exception `DataCloneError: The object could not be cloned` (<https://github.com/openvinotoolkit/cvat/pull/3733>)
- Fixed extension comparison in task frames CLI (<https://github.com/openvinotoolkit/cvat/pull/3674>)
- Incorrect work when copy job list with "Copy" button (<https://github.com/openvinotoolkit/cvat/pull/3749>)
- Iterating over manifest (<https://github.com/openvinotoolkit/cvat/pull/3792>)
- Manifest removing (<https://github.com/openvinotoolkit/cvat/pull/3791>)

### Security
Expand Down
11 changes: 5 additions & 6 deletions utils/dataset_manifest/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,11 @@ def __iter__(self):
image_number = 0
line = manifest_file.readline()
while line:
if not line.strip():
continue
parsed_properties = json.loads(line)
self._json_item_is_valid(**parsed_properties)
yield (image_number, parsed_properties)
image_number += 1
if line.strip():
parsed_properties = json.loads(line)
self._json_item_is_valid(**parsed_properties)
yield (image_number, parsed_properties)
image_number += 1
line = manifest_file.readline()

@property
Expand Down

0 comments on commit b657113

Please sign in to comment.