Rename WSRoot.transaction to WSRoot._transaction to avoid scan_api failure in some cases
This commit is contained in:
10
wsme/root.py
10
wsme/root.py
@@ -59,10 +59,10 @@ class WSRoot(object):
|
|||||||
self._webpath = webpath
|
self._webpath = webpath
|
||||||
self.protocols = []
|
self.protocols = []
|
||||||
|
|
||||||
self.transaction = transaction
|
self._transaction = transaction
|
||||||
if self.transaction is True:
|
if self._transaction is True:
|
||||||
import transaction
|
import transaction
|
||||||
self.transaction = transaction
|
self._transaction = transaction
|
||||||
|
|
||||||
for protocol in protocols:
|
for protocol in protocols:
|
||||||
self.addprotocol(protocol)
|
self.addprotocol(protocol)
|
||||||
@@ -70,8 +70,8 @@ class WSRoot(object):
|
|||||||
self._api = None
|
self._api = None
|
||||||
|
|
||||||
def begin(self):
|
def begin(self):
|
||||||
if self.transaction:
|
if self._transaction:
|
||||||
return self.transaction.begin()
|
return self._transaction.begin()
|
||||||
else:
|
else:
|
||||||
return DummyTransaction()
|
return DummyTransaction()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user