powersupply.py: Fix import module line typo

Recent commit changed the import line so it runs only when required, but
added a typo making tests uing it fail.

Change-Id: Id3e5c16adc763a9b79cc464937c541abd15f98de
Fixes: 2b959580b9
This commit is contained in:
Pau Espin 2020-04-19 18:56:43 +02:00
parent f46ae22b3d
commit a65b505adc
1 changed files with 2 additions and 2 deletions

View File

@ -53,10 +53,10 @@ class PowerSupply(log.Origin, metaclass=ABCMeta):
def get_instance_by_type(pwsupply_type, pwsupply_opt):
"""Allocate a PowerSupply child class based on type. Opts are passed to the newly created object."""
if pwsupply_type == 'sispm':
from powersupply_sispm import PowerSupplySispm
from .powersupply_sispm import PowerSupplySispm
obj = PowerSupplySispm
elif pwsupply_type == 'intellinet':
from powersupply_intellinet import PowerSupplyIntellinet
from .powersupply_intellinet import PowerSupplyIntellinet
obj = PowerSupplyIntellinet
else:
raise log.Error('PowerSupply type not supported:', pwsupply_type)