Changeset 31935
- Timestamp:
- Jul 25, 2011, 4:19:47 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/batch.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/batch.py
r31934 r31935 128 128 129 129 ''' 130 Looks for a dictionary entry. If it is not there, then replaces it with the supplied default 131 if, and only if, in test mode 132 ''' 133 def safeDictionaryAccessWithDefault(self, header, key, default): 134 135 value = self.safeDictionaryAccess(header, key) 136 137 if value != "NULL": return value 138 else: 139 if not self.testMode: return "NULL" 140 header[key] = default 141 self.logger.infoPair("Hardcoding " + key + " to", header[key]) 142 return header[key] 143 144 ''' 130 145 Returns the string value from this dictionary or else "NULL" 131 146 ''' … … 133 148 134 149 if key in header: return header[key] 135 else: return "NULL" 150 else: 151 self.logger.errorPair("Missing header field", key) 152 return "NULL" 136 153 137 154 '''
Note:
See TracChangeset
for help on using the changeset viewer.
