PlatformConfig.py (11297:d1f8610cdffd) PlatformConfig.py (11688:725fef71f376)
1# Copyright (c) 2012, 2015 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 49 unchanged lines hidden (view full) ---

58def is_platform_class(cls):
59 """Determine if a class is a Platform that can be instantiated"""
60
61 # We can't use the normal inspect.isclass because the ParamFactory
62 # and ProxyFactory classes have a tendency to confuse it.
63 try:
64 return issubclass(cls, m5.objects.Platform) and \
65 not cls.abstract
1# Copyright (c) 2012, 2015 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 49 unchanged lines hidden (view full) ---

58def is_platform_class(cls):
59 """Determine if a class is a Platform that can be instantiated"""
60
61 # We can't use the normal inspect.isclass because the ParamFactory
62 # and ProxyFactory classes have a tendency to confuse it.
63 try:
64 return issubclass(cls, m5.objects.Platform) and \
65 not cls.abstract
66 except TypeError:
66 except (TypeError, AttributeError):
67 return False
68
69def get(name):
70 """Get a platform class from a user provided class name."""
71
72 real_name = _platform_aliases.get(name, name)
73
74 try:

--- 36 unchanged lines hidden ---
67 return False
68
69def get(name):
70 """Get a platform class from a user provided class name."""
71
72 real_name = _platform_aliases.get(name, name)
73
74 try:

--- 36 unchanged lines hidden ---