From dd7314911d6a6a17bbc1747f5608a4ada000473d Mon Sep 17 00:00:00 2001 From: Eric Schneider Date: Thu, 15 Aug 2019 14:32:22 +0200 Subject: [PATCH 1/2] fixes missing required argument error Signed-off-by: Eric Schneider --- ucscsdk/ucscmethodfactory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ucscsdk/ucscmethodfactory.py b/ucscsdk/ucscmethodfactory.py index a824945..fc13664 100644 --- a/ucscsdk/ucscmethodfactory.py +++ b/ucscsdk/ucscmethodfactory.py @@ -871,7 +871,7 @@ def config_resolve_class_sorted(cookie, class_id, in_filter, in_size, in_hierarc return xml_request -def config_resolve_classes(cookie, in_ids, in_return_count_only, in_hierarchical=YesOrNo.FALSE): +def config_resolve_classes(cookie, in_ids, in_return_count_only=None, in_hierarchical=YesOrNo.FALSE): """ Auto-generated UCSC XML API Method. """ method = ExternalMethod("ConfigResolveClasses") From e59fd8b2f04e11cfda1728e593bbe89418bdc4b7 Mon Sep 17 00:00:00 2001 From: Eric Schneider Date: Tue, 17 Sep 2019 10:38:43 +0200 Subject: [PATCH 2/2] Adds missing lock release in case of errors when posting xml data Signed-off-by: Eric Schneider --- ucscsdk/ucscsession.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ucscsdk/ucscsession.py b/ucscsdk/ucscsession.py index 83549de..a700e54 100755 --- a/ucscsdk/ucscsession.py +++ b/ucscsdk/ucscsession.py @@ -247,7 +247,13 @@ def post_elem(self, elem, dme="central-mgr"): self.dump_xml_request(elem) xml_str = xc.to_xml_str(elem) - response_str = self.post_xml(xml_str, dme=dme) + response_str = "" + try: + response_str = self.post_xml(xml_str, dme=dme) + except: + self._tx_lock_release_conditional(elem) + raise + self.dump_xml_response(response_str) try: