Commit 40a7464e by rfkelly0

remove some debugging stuff

parent 31013843
...@@ -41,8 +41,6 @@ from fs.contrib.davfs.util import * ...@@ -41,8 +41,6 @@ from fs.contrib.davfs.util import *
from fs.contrib.davfs import xmlobj from fs.contrib.davfs import xmlobj
from fs.contrib.davfs.xmlobj import * from fs.contrib.davfs.xmlobj import *
logger = fs.getLogger("fs.contrib.davfs")
import errno import errno
_RETRYABLE_ERRORS = [errno.EADDRINUSE] _RETRYABLE_ERRORS = [errno.EADDRINUSE]
try: try:
...@@ -236,7 +234,6 @@ class DAVFS(FS): ...@@ -236,7 +234,6 @@ class DAVFS(FS):
except KeyError: except KeyError:
msg = "unsupported protocol: '%s'" % (url.scheme,) msg = "unsupported protocol: '%s'" % (url.scheme,)
raise RemoteConnectionError(msg=msg) raise RemoteConnectionError(msg=msg)
logger.debug("DAVFS >REQ %s %s/%s",method,url.hostname,url.path)
con = ConClass(url.hostname,url.port,timeout=self.timeout) con = ConClass(url.hostname,url.port,timeout=self.timeout)
self._add_connection(con) self._add_connection(con)
try: try:
...@@ -257,11 +254,9 @@ class DAVFS(FS): ...@@ -257,11 +254,9 @@ class DAVFS(FS):
resp = con.getresponse() resp = con.getresponse()
self._cookiejar.extract_cookies(FakeResp(resp),FakeReq(con,url.scheme,url.path)) self._cookiejar.extract_cookies(FakeResp(resp),FakeReq(con,url.scheme,url.path))
except Exception, e: except Exception, e:
logger.exception("DAVFS <ERR %s %s/%s",method,url.hostname,url.path)
self._del_connection(con) self._del_connection(con)
raise raise
else: else:
logger.debug("DAVFS <RESP %s %s %s/%s",resp.status,method,url.hostname,url.path)
old_close = resp.close old_close = resp.close
def new_close(): def new_close():
old_close() old_close()
......
...@@ -28,7 +28,6 @@ class TestTahoeLAFS(unittest.TestCase,FSTestCases):#,ThreadingTestCases): ...@@ -28,7 +28,6 @@ class TestTahoeLAFS(unittest.TestCase,FSTestCases):#,ThreadingTestCases):
def setUp(self): def setUp(self):
self.dircap = TahoeLAFS.createdircap(WEBAPI) self.dircap = TahoeLAFS.createdircap(WEBAPI)
print TahoeLAFS.__mro__
self.fs = TahoeLAFS(self.dircap, cache_timeout=0, webapi=WEBAPI) self.fs = TahoeLAFS(self.dircap, cache_timeout=0, webapi=WEBAPI)
def tearDown(self): def tearDown(self):
......
...@@ -52,18 +52,18 @@ class LazyFS(WrapFS): ...@@ -52,18 +52,18 @@ class LazyFS(WrapFS):
def _get_wrapped_fs(self): def _get_wrapped_fs(self):
"""Obtain the wrapped FS instance, creating it if necessary.""" """Obtain the wrapped FS instance, creating it if necessary."""
try: try:
return self.__dict__["wrapped_fs"] fs = self.__dict__["wrapped_fs"]
except KeyError: except KeyError:
self._lazy_creation_lock.acquire() self._lazy_creation_lock.acquire()
try: try:
try: try:
return self.__dict__["wrapped_fs"] fs = self.__dict__["wrapped_fs"]
except KeyError: except KeyError:
fs = self._fsclass(*self._fsargs,**self._fskwds) fs = self._fsclass(*self._fsargs,**self._fskwds)
self.__dict__["wrapped_fs"] = fs self.__dict__["wrapped_fs"] = fs
return fs
finally: finally:
self._lazy_creation_lock.release() self._lazy_creation_lock.release()
return fs
def _set_wrapped_fs(self, fs): def _set_wrapped_fs(self, fs):
if isinstance(fs,FS): if isinstance(fs,FS):
......
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