Skip to content

Commit 44a6be0

Browse files
glehmannydirson
authored andcommitted
fix pyright 'unknown import symbol' error
Signed-off-by: Gaëtan Lehmann <[email protected]>
1 parent 1c4d3c8 commit 44a6be0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

data.py-dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ HOST_DEFAULT_PASSWORD = ""
1212
# that the tests will create or import, such as VMs and SRs.
1313
# Default value: [your login/user]
1414
# OBJECTS_NAME_PREFIX = "[TEST]"
15+
OBJECTS_NAME_PREFIX = None
1516

1617
# Override settings for specific hosts
1718
# skip_xo_config allows to not touch XO's configuration regarding the host

lib/common.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@ def vm_image(vm_key):
2626
return url
2727

2828
def prefix_object_name(label):
29+
name_prefix = None
2930
try:
3031
from data import OBJECTS_NAME_PREFIX
3132
name_prefix = OBJECTS_NAME_PREFIX
3233
except ImportError:
34+
pass
35+
if name_prefix is None:
3336
name_prefix = f"[{getpass.getuser()}]"
3437
return f"{name_prefix} {label}"
3538

0 commit comments

Comments
 (0)