Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Existing user ID causes crash #1

@jans23

Description

@jans23

When I create to generate a new key and specify a user ID which exist in GnuPG's keyring already, nitroinit crashes with the following error.

Traceback (most recent call last):
  File "./nitroinit.py", line 227, in <module>
    main(args.keyfile, args.expert)
  File "./nitroinit.py", line 179, in main
    keyfile = create_key(expert)
  File "/home/jans/nitroinit/keycreation.py", line 99, in create_key
    newkey = c.create_key(userid, algorithm, exp_time, expires, certify=True, sign=True)
  File "/usr/lib/python3/dist-packages/gpg/core.py", line 616, in create_key
    | (constants.create.FORCE if force else 0)))
  File "/usr/lib/python3/dist-packages/gpg/core.py", line 151, in wrapper
    return _funcwrap(self, *args)
  File "/usr/lib/python3/dist-packages/gpg/core.py", line 135, in _funcwrap
    return errorcheck(result, name)
  File "/usr/lib/python3/dist-packages/gpg/errors.py", line 120, in errorcheck
    raise GPGMEError(retval, extradata)
gpg.errors.GPGMEError: gpgme_op_createkey: GnuPG: User ID already exists

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions