Giter VIP home page Giter VIP logo

Comments (5)

BoomerB avatar BoomerB commented on May 14, 2024

BTW: the representation of the items under python3 looks a bit strange, the leading "b" should not be part of the representation but indicate a type, but I'm no specialist

from pykeepass.

BoomerB avatar BoomerB commented on May 14, 2024

I have a possible solution and some tests at https://github.com/BoomerB/pykeepass
but when I try a pull request it also contains the changes for my previous pull request.

from pykeepass.

whwright avatar whwright commented on May 14, 2024

BTW: the representation of the items under python3 looks a bit strange, the leading "b" should not be part of the representation but indicate a type, but I'm no specialist

I agree with this. The issue is the __str__ function actually returns bytes instead of a str.

https://github.com/pschmitt/pykeepass/blob/0b6240866bdc62d04d41ba7c86cf010ad827ce3f/pykeepass/entry.py#L270

May deserve it's own ticket

from pykeepass.

BoomerB avatar BoomerB commented on May 14, 2024

@whwright the question is: what type should be returned? is it ok to return an unicode string - which is the default for python3 anyway - or does it have to be a plain string?
the easiest would be

return 'Entry: "{} ({})"'.format(item.path, item.username)

if it has to be a plain str, then something like

s = 'Entry: "{} ({})"'.format(item.path, item.username)
if not isinstance(s, str):
    s = s.encode('utf-8')
return s

would do the trick
BTW: we probably should add some tests with non-ascii groups and entries

from pykeepass.

Evidlo avatar Evidlo commented on May 14, 2024

BTW: we probably should add some tests with non-ascii groups and entries

There are entries with cyrillic characters in one of the test databases.

from pykeepass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.