Skip to content

UnboundLocalError: cannot access local variable 'appliance' #2983

@phillxnet

Description

@phillxnet

During development towards "TW & Slowroll - remove dnf-yum use #2979" the following error was seen:

[20/May/2025 12:18:30] INFO [system.pkg_mgmt:318] ++ switch_repo(Testing, enable_repo=False) called.
[20/May/2025 12:18:30] INFO [system.pkg_mgmt:325] --- Removing all Rockstor-* repositories
[20/May/2025 12:18:31] ERROR [storageadmin.util:45] Exception: cannot access local variable 'appliance' where it is not associated with a value
Traceback (most recent call last):
  File "/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py", line 40, in _handle_exception
    yield
  File "/opt/rockstor/src/rockstor/storageadmin/views/update_subscription.py", line 92, in post
    stableo = self._toggle_repos(password=password)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/rockstor/src/rockstor/storageadmin/views/update_subscription.py", line 71, in _toggle_repos
    ).format(ono.password, appliance.uuid)
                           ^^^^^^^^^
UnboundLocalError: cannot access local variable 'appliance' where it is not associated with a value

It is unclear if this is indicative of a released rockstor version, but has been addressed as part of the ongoing draft work under:

With the prior reproducer system now displaying the intended dialog:

Activation code (incorrect-activation-code) could not be authorized for your appliance (correct-Appliance-ID). Verify the code and try again. If the problem persists, email [email protected] with this message.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions