Skip to content

Conversation

@umlaeute
Copy link

python3 lacks the 'basestring' class, instead all strings are unicode and of type 'str'.
this patch makes easywebdav py3-able

python3 lacks the 'basestring' class, instead all strings are unicode and of type 'str'.
this patch makes easywebdav py3-able
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
would be cool if you apply this fix

@afsneto
Copy link

afsneto commented Nov 24, 2017

Just insert at the beginning of the code (after import statements):

try:
    unicode = unicode
except NameError:
    # 'unicode' is undefined, must be Python 3
    str = str
    unicode = str
    bytes = bytes
    basestring = (str,bytes)
else:
    # 'unicode' exists, must be Python 2
    str = str
    unicode = unicode
    bytes = str
    basestring = basestring

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.

2 participants