xrg has proposed merging lp:~openerp-dev/openobject-client/trunk-bug-794302-xrg
into lp:openobject-client.
Requested reviews:
OpenERP sa GTK client R&D (openerp-dev-gtk)
Related bugs:
Bug #794302 in OpenERP GTK Client: "rpc, main: IPv6 support"
https://bugs.launchpad.net/openobject-client/+bug/794302
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client/trunk-bug-794302-xrg/+merge/63783
--
https://code.launchpad.net/~openerp-dev/openobject-client/trunk-bug-794302-xrg/+merge/63783
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client/trunk-bug-794302-xrg.
=== modified file 'bin/modules/gui/main.py'
--- bin/modules/gui/main.py 2011-05-10 11:40:45 +0000
+++ bin/modules/gui/main.py 2011-06-07 22:34:24 +0000
@@ -424,7 +424,7 @@
listprotocol = gtk.ListStore(str)
protocol_widget.set_model(listprotocol)
- m = re.match('^(http[s]?://|socket://)([\w.-]+):(\d{1,5})$', server_widget.get_text())
+ m = rpc.re_url.match(server_widget.get_text())
if m:
host_widget.set_text(m.group(2))
port_widget.set_text(m.group(3))
@@ -526,7 +526,7 @@
iter = liststore.iter_next(iter)
res = win.run()
- m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', server_widget.get_text() or '')
+ m = rpc.re_url.match(server_widget.get_text() or '')
if m:
if combo_db.flags() & gtk.VISIBLE:
dbname = combo_db.get_active_text()
@@ -620,7 +620,7 @@
passwd = pass_widget.get_text()
user_pass = self.dialog.get_widget('ent_user_pass1').get_text()
url = self.server_widget.get_text()
- m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', url or '')
+ m = rpc.re_url.match(url or '')
if m:
options.options['login.server'] = m.group(2)
options.options['login.port'] = m.group(3)
@@ -663,7 +663,7 @@
pbar.pulse()
if progress == 1.0:
win.destroy()
- m = re.match('^(http[s]?://|socket://)([\w.]+):(\d{1,5})$', url)
+ m = rpc.re_url.match(url)
ok = False
for x in users:
if x['login']=='admin' and m:
=== modified file 'bin/rpc.py'
--- bin/rpc.py 2011-01-06 09:49:16 +0000
+++ bin/rpc.py 2011-06-07 22:34:24 +0000
@@ -35,6 +35,8 @@
CONCURRENCY_CHECK_FIELD = '__last_update'
+re_url = re.compile('^(http[s]?://|socket://)((?:[\w.\-]+)|(?:.+)):(\d{1,5})$')
+
class rpc_exception(Exception):
def __init__(self, code, backtrace):
@@ -284,7 +286,7 @@
return self.exec_no_except(url, 'db', method, *args)
def exec_no_except(self, url, resource, method, *args):
- m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', url or '')
+ m = re_url.match(url or '')
if m.group(1) == 'http://' or m.group(1) == 'https://':
sock = xmlrpclib.ServerProxy(url + '/xmlrpc/' + resource)
return getattr(sock, method)(*args)
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp