Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions labgrid/resource/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import attr

from ..factory import target_factory
from ..exceptions import InvalidConfigError
from .common import NetworkResource, ManagedResource, ResourceManager


Expand Down Expand Up @@ -47,8 +48,13 @@ def on_resource_added(self, resource):
resource_entries = self.session.get_target_resources(place) # pylint: disable=no-member
expanded = []
for (resource_name, _), resource_entry in resource_entries.items():
new = target_factory.make_resource(
remote_place.target, resource_entry.cls, resource_name, resource_entry.args)
try:
new = target_factory.make_resource(
remote_place.target, resource_entry.cls, resource_name, resource_entry.args)
except InvalidConfigError:
self.logger.warning("unknown resource cls: %s, name: %s", resource_entry.cls, resource_name)
continue

new.parent = remote_place
new.avail = resource_entry.avail
new.extra = resource_entry.extra
Expand Down