Robot Framework
modelcombiner.py
Go to the documentation of this file.
1 # Copyright 2008-2015 Nokia Networks
2 # Copyright 2016- Robot Framework Foundation
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 
16 
18  __slots__ = ['data', 'result', 'priority']
19 
20  def __init__(self, data, result, **priority):
21  self.datadata = data
22  self.resultresult = result
23  self.prioritypriority = priority
24 
25  def __getattr__(self, name):
26  if name in self.prioritypriority:
27  return self.prioritypriority[name]
28  if hasattr(self.resultresult, name):
29  return getattr(self.resultresult, name)
30  if hasattr(self.datadata, name):
31  return getattr(self.datadata, name)
32  raise AttributeError(name)
def __init__(self, data, result, **priority)