Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix child.text==None #37

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

sashabaranov
Copy link

With dCache I got next issue:

Traceback (most recent call last):
  File "webdav_test.py", line 3, in <module>
    print webdav.ls()
  File "easywebdav/easywebdav/client.py", line 184, in ls
    return [elem2file(elem) for elem in tree.findall('{DAV:}response')]
  File "easywebdav/easywebdav/client.py", line 40, in elem2file
    int(prop(elem, 'getcontentlength', 0)),
TypeError: int() argument must be a string or a number, not 'NoneType'

The idea is that in prop function child.text was returned, but it was None.

Here are some print child, child.text from prop function:

<Element '{DAV:}href' at 0x7fb5d1a00510> /./
<Element '{DAV:}getcontentlength' at 0x7fb5d1a00810> None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant