robmcmullen / omnivore

Hex editor and debugging emulator, sponsored by the Player/Missile Podcast
Mozilla Public License 2.0
53 stars 7 forks source link

Ignore bad values in label files? #201

Closed robmcmullen closed 7 years ago

robmcmullen commented 7 years ago

Loading a file not in label file format results in:

  File "/noaa/maproom-deps/omnivore/pyface/ui/wx/action/action_item.py", line 277, in _on_menu
    self.controller.perform(action, action_event)
  File "/noaa/maproom-deps/omnivore/pyface/tasks/action/task_action_controller.py", line 31, in perform
    return action.perform(event)
  File "/noaa/maproom-deps/omnivore/omnivore8bit/hex_edit/actions.py", line 860, in perform
    d = parse_int_label_dict(text, allow_equals=True)
  File "/noaa/maproom-deps/omnivore/omnivore/utils/textutil.py", line 331, in parse_int_label_dict
    key = int(key, line_base)
ValueError: invalid literal for int() with base 10: 'c'

I think it should just ignore lines that don't work and try to load everything else.