Revision 4026
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_gen.py | ||
---|---|---|
679 | 679 |
This allows the exception to be parsed like a native exception. |
680 | 680 |
Always raise as data_exception so it goes in the errors table. */ |
681 | 681 |
IF exc_name IS NOT NULL THEN |
682 |
RAISE data_exception USING MESSAGE = msg;
|
|
682 |
RAISE data_exception USING MESSAGE = msg; |
|
683 | 683 |
-- Re-raise non-PL/Python exceptions |
684 | 684 |
ELSE |
685 | 685 |
'''+reraise_exc+'''\ |
lib/xpath.py | ||
---|---|---|
255 | 255 |
if util.is_list(value_): # reference (different from a pointer) |
256 | 256 |
target = get_1(root, value_) |
257 | 257 |
if target != None: value_ = xml_dom.value(target) |
258 |
else:
|
|
258 |
else: |
|
259 | 259 |
warnings.warn(UserWarning('XPath reference target missing: ' |
260 | 260 |
+str(value_)+'\nXPath: '+str(xpath))) |
261 | 261 |
value_ = None |
lib/parallelproc.py | ||
---|---|---|
108 | 108 |
return self |
109 | 109 |
|
110 | 110 |
def main_loop(self): |
111 |
'''Prime the task queue with at least one task before calling this'''
|
|
111 |
'''Prime the task queue with at least one task before calling this''' |
|
112 | 112 |
while True: |
113 | 113 |
try: call = self.queue.get(timeout=0.1) # sec |
114 | 114 |
except Queue.Empty: |
bin/map | ||
---|---|---|
110 | 110 |
env_names), u'')) |
111 | 111 |
|
112 | 112 |
# Set default verbosity. Must happen after by_col is set. |
113 |
if verbosity == None:
|
|
113 |
if verbosity == None: |
|
114 | 114 |
if test: verbosity = 0.5 # automated tests should not be verbose |
115 | 115 |
elif by_col: verbosity = 3 # show all queries to assist profiling |
116 | 116 |
else: verbosity = 1.1 # just show row progress |
... | ... | |
221 | 221 |
out_is_xml_ref[0] = out_is_xpaths and not out_is_db |
222 | 222 |
|
223 | 223 |
def process_rows(process_row, rows, rows_start=0): |
224 |
'''Processes input rows
|
|
224 |
'''Processes input rows |
|
225 | 225 |
@param process_row(in_row, i) |
226 | 226 |
@rows_start The (0-based) row # of the first row in rows. Set this |
227 | 227 |
only if the pre-start rows have already been skipped. |
... | ... | |
270 | 270 |
'$'+str(in_)) # value is placeholder that documents name |
271 | 271 |
mappings[i] = [in_, nodes] |
272 | 272 |
if id_node == None: |
273 |
warnings.warn(UserWarning('Map warning: No mappings'))
|
|
273 |
warnings.warn(UserWarning('Map warning: No mappings')) |
|
274 | 274 |
sys.stdout.write('Put template:\n'+str(root)) |
275 | 275 |
sys.stdout.flush() |
276 | 276 |
|
Also available in: Unified diff
Removed trailing whitespace on non-empty lines