Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
29ba95ea7e7d
Commit
8c1d5a39
authored
Feb 18, 2009
by
sylvain.thenault@logilab.fr
Browse files
no more used
--HG-- branch : tls-sprint
parent
ed106bb2dcd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
cwvreg.py
View file @
29ba95ea
...
...
@@ -18,11 +18,25 @@ from cubicweb.vregistry import VRegistry, ObjectNotFound, NoSelectableObject
_
=
unicode
class
DummyCursorError
(
Exception
):
pass
class
RaiseCursor
:
@
classmethod
def
execute
(
cls
,
rql
,
args
=
None
,
eid_key
=
None
):
raise
DummyCursorError
()
def
use_interfaces
(
obj
):
from
cubicweb.selectors
import
implements
try
:
# XXX deprecated
return
sorted
(
obj
.
accepts_interfaces
)
except
AttributeError
:
try
:
impl
=
obj
.
__select__
.
search_selector
(
implements
)
if
impl
:
return
sorted
(
impl
.
expected_ifaces
)
except
AttributeError
:
pass
# old-style vobject classes with no accepts_interfaces
return
()
def
expand_parent_classes
(
iface
):
res
=
[
iface
]
for
parent
in
iface
.
__bases__
:
res
+=
expand_parent_classes
(
parent
)
return
res
class
CubicWebRegistry
(
VRegistry
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment