Commit 0212f65e authored by Cédric de Saint Martin's avatar Cédric de Saint Martin Committed by Rafael Monnerat

slap: expose ConnectionError.

parent dc996cc6
...@@ -33,7 +33,7 @@ Simple, easy to (un)marshall classes for slap client/server communication ...@@ -33,7 +33,7 @@ Simple, easy to (un)marshall classes for slap client/server communication
__all__ = ["slap", "ComputerPartition", "Computer", "SoftwareRelease", __all__ = ["slap", "ComputerPartition", "Computer", "SoftwareRelease",
"SoftwareProductCollection", "SoftwareProductCollection",
"Supply", "OpenOrder", "NotFoundError", "Supply", "OpenOrder", "NotFoundError",
"ResourceNotReady", "ServerError"] "ResourceNotReady", "ServerError", "ConnectionError"]
import logging import logging
import re import re
...@@ -506,10 +506,10 @@ class ComputerPartition(SlapRequester): ...@@ -506,10 +506,10 @@ class ComputerPartition(SlapRequester):
connection_dict = getattr(self, '_connection_dict', None) connection_dict = getattr(self, '_connection_dict', None)
if connection_dict is None: if connection_dict is None:
# XXX Backward compatibility for older slapproxy (<= 1.0.0) # XXX Backward compatibility for older slapproxy (<= 1.0.0)
connection_dict = xml2dict(getattr(self, 'connection_xml', '')) connection_dict = xml2dict(getattr(self, 'connection_xml', ''))
return connection_dict or {} return connection_dict or {}
def getSoftwareRelease(self): def getSoftwareRelease(self):
""" """
Returns the software release associate to the computer partition. Returns the software release associate to the computer partition.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment