python examples: another importer
* Fixed a similar type of bug with the non-protonmail importer.
This commit is contained in:
parent
1b9d30db08
commit
0cb625da84
@ -45,7 +45,10 @@ else:
|
||||
|
||||
try:
|
||||
keys = server.search(pattern)
|
||||
if keys is not None:
|
||||
print("Found {0} key(s).".format(len(keys)))
|
||||
else:
|
||||
pass
|
||||
except Exception as e:
|
||||
keys = []
|
||||
for logrus in pattern.split():
|
||||
@ -56,7 +59,8 @@ except Exception as e:
|
||||
keys.append(key[0])
|
||||
print("Found {0} key(s).".format(len(keys)))
|
||||
|
||||
for key in keys:
|
||||
if keys is not None:
|
||||
for key in keys:
|
||||
import_result = c.key_import(key.key_blob)
|
||||
results.append(import_result)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user