Merge lp:~syleam/openobject-library/interactive_mode_switching into lp:openobject-library/1.0

Proposed by Sylvain Garancher
Status: Merged
Merged at revision: 94
Proposed branch: lp:~syleam/openobject-library/interactive_mode_switching
Merge into: lp:openobject-library/1.0
Diff against target: 26 lines (+4/-1)
1 file modified
example/object_interractive_mode.py (+4/-1)
To merge this branch: bzr merge lp:~syleam/openobject-library/interactive_mode_switching
Reviewer Review Type Date Requested Status
Christophe CHAUVET Approve
Review via email: mp+80467@code.launchpad.net

Description of the change

Switch to interactive mode after printing help to avoid a traceback

To post a comment you must log in.
Revision history for this message
Christophe CHAUVET (christophe-chauvet) wrote :

Ok

I fix the issue with locals() value doesn't pass

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'example/object_interractive_mode.py'
2--- example/object_interractive_mode.py 2011-08-23 13:26:30 +0000
3+++ example/object_interractive_mode.py 2011-10-26 15:37:26 +0000
4@@ -1,4 +1,4 @@
5-#!/usr/bin/python -i
6+#!/usr/bin/python
7 # --*- coding: utf-8 -*-
8 ##############################################################################
9 #
10@@ -27,6 +27,7 @@
11 """
12
13 import sys
14+import code
15 sys.path.append('../')
16
17 from oobjlib.connection import Connection
18@@ -59,6 +60,8 @@
19 print '%s' % str(e)
20 exit(1)
21
22+code.interact()
23+
24 print 80 * '*'
25 print '* A connection was established to %s on database %s with user %s ' % (opts.server, opts.dbname, opts.user)
26 print '* Use "cnx" variable for the current connection'

Subscribers

People subscribed via source and target branches