From aff08f1d0b8d16e7b693d5bfd4ff74a542a4dd0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 30 Apr 2009 17:41:38 +0200 Subject: [PATCH] Move _get_dburi into staticmethod get_dburi and keep backward compatibility --- trytond/protocols/webdav.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trytond/protocols/webdav.py b/trytond/protocols/webdav.py index 27bb6aa9d9..0dafb1b9b0 100644 --- a/trytond/protocols/webdav.py +++ b/trytond/protocols/webdav.py @@ -140,13 +140,17 @@ class TrytonDAVInterface(iface.dav_interface): self.baseuri = '%s://%s:%s/' % (protocol, interface or socket.gethostname(), port) self.verbose = False - def _get_dburi(self, uri): + @staticmethod + def get_dburi(uri): uri = urlparse.urlsplit(uri)[2] if uri[0] == '/': uri = uri[1:] dbname, uri = (uri.split('/', 1) + [None])[0:2] return dbname, uri + def _get_dburi(self, uri): + return TrytonDAVInterface.get_dburi(uri) + def get_childs(self, uri): res = [] dbname, dburi = self._get_dburi(uri)