doc: python bindings howto
authorBen McGinnes <ben@adversary.org>
Mon, 12 Mar 2018 18:42:50 +0000 (05:42 +1100)
committerBen McGinnes <ben@adversary.org>
Mon, 12 Mar 2018 18:42:50 +0000 (05:42 +1100)
* Fixed an error in the encryption try/except statement.

lang/python/docs/GPGMEpythonHOWTOen.org

index 84be851..22b47cc 100644 (file)
          for i in range(len(e.recipients)):
              for n in range(len(rlogrus)):
                  if rlogrus[n].fpr == e.recipients[i].fpr:
-                     rlogrus.remove(e.recipients[i])
+                     rlogrus.remove(rlogrus[n])
+                  else:
+                      pass
          try:
              cipher = c.encrypt(text, recipients=rlogrus, add_encrypt_to=True)
          except: