Venom1991 / refind-btrfs

Generate rEFInd manual boot stanzas from Btrfs snapshots
GNU General Public License v3.0
151 stars 9 forks source link

UnboundLocalError: local variable 'is_excluded' referenced before assignment #41

Closed sparklyballs closed 2 years ago

sparklyballs commented 2 years ago

running refind-btrfs with version.0 5.0 throws the following, arch os with gnome DE.

ERROR (refind_btrfs/__init__.py/main): An unexpected error happened, exiting...
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/refind_btrfs/__init__.py", line 80, in main
    exit_code = runner.run()
  File "/usr/lib/python3.10/site-packages/refind_btrfs/console/cli_runner.py", line 49, in run
    if not machine.run():
  File "/usr/lib/python3.10/site-packages/refind_btrfs/state_management/refind_btrfs_machine.py", line 102, in run
    while model.next_state():
  File "/usr/lib/python3.10/site-packages/transitions/core.py", line 401, in trigger
    return self.machine._process(func)
  File "/usr/lib/python3.10/site-packages/transitions/core.py", line 1188, in _process
    return trigger()
  File "/usr/lib/python3.10/site-packages/transitions/core.py", line 426, in _trigger
    return self._process(event_data)
  File "/usr/lib/python3.10/site-packages/transitions/core.py", line 435, in _process
    if trans.execute(event_data):
  File "/usr/lib/python3.10/site-packages/transitions/core.py", line 276, in execute
    self._change_state(event_data)
  File "/usr/lib/python3.10/site-packages/transitions/core.py", line 286, in _change_state
    event_data.machine.get_state(self.dest).enter(event_data)
  File "/usr/lib/python3.10/site-packages/transitions/core.py", line 128, in enter
    event_data.machine.callbacks(self.on_enter, event_data)
  File "/usr/lib/python3.10/site-packages/transitions/core.py", line 1123, in callbacks
    self.callback(func, event_data)
  File "/usr/lib/python3.10/site-packages/transitions/core.py", line 1144, in callback
    func(*event_data.args, **event_data.kwargs)
  File "/usr/lib/python3.10/site-packages/refind_btrfs/state_management/model.py", line 267, in combine_boot_stanzas_with_snapshots
    boot_stanza, is_excluded, matched_snapshots, unmatched_snapshots
UnboundLocalError: local variable 'is_excluded' referenced before assignment
Venom1991 commented 2 years ago

Until I fix this obvious programming error, you can try setting the "include_paths" config setting to "true" as a temporary workaround. Sorry for the inconvenience.

Venom1991 commented 2 years ago

Fixed in release 0.5.1.