db.py (2014:7df693ff6fa4) | db.py (2183:4420c8fadbf5) |
---|---|
1# Copyright (c) 2003-2004 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 --- 144 unchanged lines hidden (view full) --- 153 self._method = type(self).sum 154 155 def get(self, job, stat, system=None): 156 run = self.allRunNames.get(str(job), None) 157 if run is None: 158 return None 159 160 from info import ProxyError, scalar, vector, value, values, total, len | 1# Copyright (c) 2003-2004 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 --- 144 unchanged lines hidden (view full) --- 153 self._method = type(self).sum 154 155 def get(self, job, stat, system=None): 156 run = self.allRunNames.get(str(job), None) 157 if run is None: 158 return None 159 160 from info import ProxyError, scalar, vector, value, values, total, len |
161 if system is None and hasattr('system', job): | 161 if system is None and hasattr(job, 'system'): |
162 system = job.system 163 164 if system is not None: 165 stat.system = self[system] 166 try: 167 if scalar(stat): 168 return value(stat, run.run) 169 if vector(stat): --- 336 unchanged lines hidden --- | 162 system = job.system 163 164 if system is not None: 165 stat.system = self[system] 166 try: 167 if scalar(stat): 168 return value(stat, run.run) 169 if vector(stat): --- 336 unchanged lines hidden --- |