Erik Grinaker is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

erikg / Revelation

Revelation is a password manager for the GNOME desktop, released under the GNU GPL license. It stores all your accounts and passwords in a single, secure place, and gives you access to it through a user-friendly graphical interface.

Clone this repository (size: 2.1 MB): HTTPS / SSH
hg clone https://bitbucket.org/erikg/revelation
hg clone ssh://hg@bitbucket.org/erikg/revelation

Issues

#13 Revelation 0.4.11 on Fedora 7: export to password safe v.2 fails

Reported by Steve Singer

I tried to export a password file to my Gnome desktop.

Judging from this diagnostic, one of my entries has an empty user name field--possibly one for my Linksys router:

Traceback (most recent call last):

File "/usr/bin/revelation", line 182, in <lambda> action.connect("activate", lambda w: self.file_export())

File "/usr/bin/revelation", line 1348, in file_export datafile.save(self.entrystore, file, password)

File "/usr/lib/python2.5/site-packages/revelation/io.py", line 125, in save file_write(file, self.handler.export_data(entrystore, password))

File "/usr/lib/python2.5/site-packages/revelation/datahandler/pwsafe.py", line 577, in export_data edata += create_field(e[entry.UsernameField].encode(enc, "replace"), FIELDTYPE_USER) AttributeError: 'NoneType' object has no attribute 'encode'

Sorry, but I would not be comfortable shipping my data file to pinpoint the problem. ;-)

--Steve Singer

Status: resolved Responsible: Erik Grinaker Type: bug Priority: minor
Milestone: none Component: none Version: none

Attachments

No attachments added for this issue yet.

Comments and changes

  1. #1 Anonymous

    written

    I had the same problem (Revelation 0.4.11, Ubuntu 8.04), fixed /usr/share/pyshared/revelation/datahandler/pwsafe.py with this patch:

    --- pwsafe.py.BAK	2007-05-22 19:56:39.000000000 +1200
    +++ pwsafe.py	2010-01-11 13:34:22.000000000 +1300
    @@ -574,7 +574,10 @@
     				edata += create_field(uuid, FIELDTYPE_UUID)
     				edata += create_field(self.__get_group(entrystore, iter), FIELDTYPE_GROUP)
     				edata += create_field(e.name.encode(enc, "replace"), FIELDTYPE_TITLE)
    -				edata += create_field(e[entry.UsernameField].encode(enc, "replace"), FIELDTYPE_USER)
    +				s = e[entry.UsernameField]
    +				if s is None:
    +					s = ""
    +				edata += create_field(s.encode(enc, "replace"), FIELDTYPE_USER)
     				edata += create_field(e[entry.PasswordField].encode(enc, "replace"), FIELDTYPE_PASSWORD)
     				edata += create_field(e.description.encode(enc, "replace"), FIELDTYPE_NOTES)
     				edata += create_field("", FIELDTYPE_END)
    

    -- Stuart Rackham

  2. #2 Anonymous

    written

    Bump!

  3. #3 Anonymous

    written

    I had the same problem (Revelation 0.4.11, Ubuntu 8.04), fixed /usr/share/pyshared/revelation/datahandler/pwsafe.py with this patch:

    --- pwsafe.py.BAK	2007-05-22 19:56:39.000000000 +1200
    +++ pwsafe.py	2010-01-11 13:34:22.000000000 +1300
    @@ -574,7 +574,10 @@
     				edata += create_field(uuid, FIELDTYPE_UUID)
     				edata += create_field(self.__get_group(entrystore, iter), FIELDTYPE_GROUP)
     				edata += create_field(e.name.encode(enc, "replace"), FIELDTYPE_TITLE)
    -				edata += create_field(e[entry.UsernameField].encode(enc, "replace"), FIELDTYPE_USER)
    +				s = e[entry.UsernameField]
    +				if s is None:
    +					s = ""
    +				edata += create_field(s.encode(enc, "replace"), FIELDTYPE_USER)
     				edata += create_field(e[entry.PasswordField].encode(enc, "replace"), FIELDTYPE_PASSWORD)
     				edata += create_field(e.description.encode(enc, "replace"), FIELDTYPE_NOTES)
     				edata += create_field("", FIELDTYPE_END)
    

    -- Stuart Rackham

  4. #4 Steve Singer

    written

    Thanks.

    NB: in RedHat distributions, this patch should be applied to:

    /usr/lib/python#.#/site-packages/revelation/datahandler/pwsafe.py

    For Fedora 7:

    /usr/lib/python2.5/site-packages/revelation/datahandler/pwsafe.py

  5. #5 Anonymous

    written

    Was this fixed in revision 4.12?

  6. #6 Steve Singer

    written

    • Changed priority from major to minor.
    • Changed responsible from nobody to erikg.
    • Changed status from new to open.

    The source code of pwsafe.py for revision 0.4.12 does NOT include the patch above. So Fedora 8 through Fedora 16 all presumably exhibit this problem, together with the other distributions.

  7. #7 Mikel Olasagasti Uranga

    written

    • Changed status from open to resolved.

    Patch applied to master, will be on next release. Thanks Steve & Stuart!

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?