config.py (2797:b5f26b4eacef) | config.py (2831:0a42b294727c) |
---|---|
1# Copyright (c) 2004-2006 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 260 unchanged lines hidden (view full) --- 269 (e, cls.__name__, attr, value) 270 e.args = (msg, ) 271 raise 272 elif isSimObjectOrSequence(value): 273 # if RHS is a SimObject, it's an implicit child assignment 274 cls._values[attr] = value 275 else: 276 raise AttributeError, \ | 1# Copyright (c) 2004-2006 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 260 unchanged lines hidden (view full) --- 269 (e, cls.__name__, attr, value) 270 e.args = (msg, ) 271 raise 272 elif isSimObjectOrSequence(value): 273 # if RHS is a SimObject, it's an implicit child assignment 274 cls._values[attr] = value 275 else: 276 raise AttributeError, \ |
277 "Class %s has no parameter %s" % (cls.__name__, attr) | 277 "Class %s has no parameter \'%s\'" % (cls.__name__, attr) |
278 279 def __getattr__(cls, attr): 280 if cls._values.has_key(attr): 281 return cls._values[attr] 282 283 raise AttributeError, \ 284 "object '%s' has no attribute '%s'" % (cls.__name__, attr) 285 --- 1242 unchanged lines hidden --- | 278 279 def __getattr__(cls, attr): 280 if cls._values.has_key(attr): 281 return cls._values[attr] 282 283 raise AttributeError, \ 284 "object '%s' has no attribute '%s'" % (cls.__name__, attr) 285 --- 1242 unchanged lines hidden --- |