fix(linstor): use quotes on linstor type annotations - #150
Merged
Conversation
Without that and if LINSTOR python package is not installed we can have issues to register our drivers. `AttributeError` is raised and not catched by other modules during imports... Trace: ``` Jul 30 17:11:36 hpm1c20 xapi: [error||0 |Registering SMAPIv1 plugins D:6829eea78bbd|sm_exec] Rejecting SM plugin: LVM because of exception: Storage_error ([S(Backend_error);[S(SR_BACKEND_FAILURE);[S(non-zero exit);S();S(Traceback (most recent call last):\x0A File "/opt/xensource/sm/LVMSR", line 23, in <module>\x0A import SR\x0A File "/opt/xensource/sm/SR.py", line 23, in <module>\x0A import VDI\x0A File "/opt/xensource/sm/VDI.py", line 21, in <module>\x0A import cleanup\x0A File "/opt/xensource/sm/cleanup.py", line 44, in <module>\x0A import blktap2\x0A File "/opt/xensource/sm/blktap2.py", line 60, in <module>\x0A from linstorvolumemanager import get_controller_uri, get_all_volume_openers, LinstorVolumeManager\x0A File "/opt/xensource/sm/linstorvolumemanager.py", line 262, in <module>\x0A class LinstorVolumeManager(object):\x0A File "/opt/xensource/sm/linstorvolumemanager.py", line 420, in LinstorVolumeManager\x0A def native_client(self) -> linstor.Linstor:\x0AAttributeError: module 'linstor' has no attribute 'Linstor'\x0A)]]]) (executable) ``` Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.tech>
Kuruyia
approved these changes
Jul 30, 2026
Kuruyia
left a comment
There was a problem hiding this comment.
Oops, I wasn't aware of that... I'll know for next time.
klmp200
approved these changes
Jul 30, 2026
Member
Author
No worries, I let my guard down. We wouldn't have this problem if the architecture were more modular. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without that and if LINSTOR python package is not installed we can have issues to register our drivers.
AttributeErroris raised and not catched by other modules during imports...Trace: