Merge lp:~patrick-crews/drizzle/dbqp_bug727506 into lp:drizzle/7.0

Proposed by Patrick Crews
Status: Merged
Approved by: Lee Bieber
Approved revision: 2212
Merged at revision: 2214
Proposed branch: lp:~patrick-crews/drizzle/dbqp_bug727506
Merge into: lp:drizzle/7.0
Diff against target: 65 lines (+29/-26)
1 file modified
tests/dbqp.py (+29/-26)
To merge this branch: bzr merge lp:~patrick-crews/drizzle/dbqp_bug727506
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+51842@code.launchpad.net

Description of the change

adjusted dbqp.py to nest try/except block in try/finally to deal with python 2.4 on red hat

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/dbqp.py'
2--- tests/dbqp.py 2011-02-17 16:27:25 +0000
3+++ tests/dbqp.py 2011-03-02 00:57:14 +0000
4@@ -51,32 +51,35 @@
5 execution_manager = None
6
7 try:
8- # Some system-level work is constant regardless
9- # of the test to be run
10- system_manager = systemManager(variables)
11-
12- # Create our server_manager
13- server_manager = serverManager(system_manager, variables)
14-
15- # Get our mode-specific test_manager and test_executor
16- (test_manager,test_executor) = handle_mode(variables, system_manager)
17-
18- # Gather our tests for execution
19- test_manager.gather_tests()
20-
21- # Initialize test execution manager
22- execution_manager = executionManager(server_manager, system_manager
23- , test_manager, test_executor
24- , variables)
25-
26- # Execute our tests!
27- execution_manager.execute_tests()
28-
29-except Exception, e:
30- print Exception, e
31-
32-except KeyboardInterrupt:
33- print "\n\nDetected <Ctrl>+c, shutting down and cleaning up..."
34+ # We do this nested try to accomodate red hat
35+ # running python 2.4...seriously? 2.4?
36+ try:
37+ # Some system-level work is constant regardless
38+ # of the test to be run
39+ system_manager = systemManager(variables)
40+
41+ # Create our server_manager
42+ server_manager = serverManager(system_manager, variables)
43+
44+ # Get our mode-specific test_manager and test_executor
45+ (test_manager,test_executor) = handle_mode(variables, system_manager)
46+
47+ # Gather our tests for execution
48+ test_manager.gather_tests()
49+
50+ # Initialize test execution manager
51+ execution_manager = executionManager(server_manager, system_manager
52+ , test_manager, test_executor
53+ , variables)
54+
55+ # Execute our tests!
56+ execution_manager.execute_tests()
57+
58+ except Exception, e:
59+ print Exception, e
60+
61+ except KeyboardInterrupt:
62+ print "\n\nDetected <Ctrl>+c, shutting down and cleaning up..."
63
64 finally:
65 # TODO - make a more robust cleanup

Subscribers

People subscribed via source and target branches