~jelmer/pygpgme/bug452194

« back to all changes in this revision

Viewing changes to src/pygpgme-genkey.c

  • Committer: James Henstridge
  • Date: 2009-04-01 09:05:02 UTC
  • Revision ID: james@jamesh.id.au-20090401090502-n5fzpujqoi15q2bd
Convert code that was generating byte strings to unicode strings where
appropriate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    self->primary = PyBool_FromLong(result->primary);
66
66
    self->sub = PyBool_FromLong(result->sub);
67
67
    if (result->fpr)
68
 
        self->fpr = PyBytes_FromString(result->fpr);
 
68
        self->fpr = PyUnicode_DecodeASCII(result->fpr, strlen(result->fpr),
 
69
                                          "replace");
69
70
    else {
70
71
        Py_INCREF(Py_None);
71
72
        self->fpr = Py_None;