From 38c356671741dddea401c34af42a01fb862a7f3f Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 14 Feb 2013 20:02:35 +0100 Subject: [PATCH] generic_platform: add name --- mibuild/generic_platform.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mibuild/generic_platform.py b/mibuild/generic_platform.py index 844bcab9..09a18214 100644 --- a/mibuild/generic_platform.py +++ b/mibuild/generic_platform.py @@ -163,10 +163,13 @@ class ConstraintManager: self.request, self.platform_commands, self.io_signals = backup class GenericPlatform: - def __init__(self, device, io, default_crg_factory=None): + def __init__(self, device, io, default_crg_factory=None, name=None): self.device = device self.constraint_manager = ConstraintManager(io) self.default_crg_factory = default_crg_factory + if name is None: + name = self.__module__.split(".")[-1] + self.name = name self.sources = [] def request(self, *args, **kwargs): -- 2.30.2