HN44 / pywebdav

Automatically exported from code.google.com/p/pywebdav
0 stars 0 forks source link

do_LOCK exception during bonnie++ on mac os x #67

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  run bonnie++ against a webdav mount in mac os x
2.
3.

What is the expected output? What do you see instead?

bonnie++ should complete successfully.  Instead, during the file create or file 
delete portion of the test, bonnie will complain that it was unable to create 
or delete a file.  The davserver output shows an exception:

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/S
ocketServer.py", line 582, in process_request_thread
    self.finish_request(request, client_address)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/S
ocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/S
ocketServer.py", line 639, in __init__
    self.handle()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/B
aseHTTPServer.py", line 343, in handle
    self.handle_one_request()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 331, in handle_one_request
    method()
  File "/Library/Python/2.7/site-packages/PyWebDAV-0.9.8-py2.7.egg/pywebdav/lib/locks.py", line 152, in do_LOCK
    taglist = IfParser(ifheader)
  File "/Library/Python/2.7/site-packages/PyWebDAV-0.9.8-py2.7.egg/pywebdav/lib/utils.py", line 191, in IfParser
    m = IfHdr.search(hdr[i:])
TypeError: 'NoneType' object is not subscriptable

What version of the product are you using? On what operating system?

pywebdav 0.9.8 with python 2.7.2 on mac os x mountain lion

Please provide any additional information below.

As a workaround, I changed the while loop in utils.py:IfParser() from "while 
1:" to "while hdr:".  With this change and patches collected from other open 
issues, bonnie++ will complete successfully.

Original issue reported on code.google.com by boyls...@burromesa.net on 29 Jan 2013 at 11:26