-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
engine: save_addr_props: Properly skip areas without properties.
- Loading branch information
Showing
1 changed file
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93b1e21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am thinking whether we should add warnings and write them at least to the logfile, so that we can analyze them in case we are starting to loose data we shouldn't loose.
93b1e21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that's the reason why exceptions are logged and even showed to user in many other places ;-). In that particular case, it's safe - an issue would have been logged before. And save routines are optimized for speed (expected to be frequent operation), so doing extra stuff is not desirable. Anyway, I definitely keep that thing in mind - need to open a dedicated ticket to track it consistently actually.
93b1e21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P.S. Btw, "except IndexError" is not an error here, it's normal termination condition. That's exactly that "optimization for speed" - as Python check array bounds itself anyway, just relying on that to see when array is exhausted, instead of additional explicit check - that's not how I'd write a normal Python code, but again, that whole func is coded to cut overheads.