mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-11-18 08:37:25 +01:00
gpg: Don't crash if python-gnupg cannot find the gnupg binary.
Reported traceback:
File D:python27libsite-packagessupybotgpg.py, line 45, in <module>
gnupg.GPG(gnupghome=None)
File D:python27libsite-packagesgnupg.py, line 680, in __init__
p = self._open_subprocess([--version])
File D:python27libsite-packagesgnupg.py, line 726, in _open_subprocess
return Popen(cmd, shell=False, stdin=PIPE, stdout=PIPE, stderr=PIPE)
File D:python27libsubprocess.py, line 710, in __init__
errread, errwrite)
File D:python27libsubprocess.py, line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
This commit is contained in:
parent
5bd0001d02
commit
9cb967023e
@ -28,6 +28,7 @@
|
||||
###
|
||||
|
||||
import os
|
||||
import traceback
|
||||
|
||||
import supybot.log as log
|
||||
import supybot.conf as conf
|
||||
@ -46,6 +47,11 @@ try:
|
||||
except TypeError:
|
||||
# This is the 'gnupg' library, not 'python-gnupg'.
|
||||
gnupg = None
|
||||
except OSError: # WindowsError?
|
||||
gnupg = None
|
||||
log.error('Cannot use GPG. python-gnupg is installed but cannot '
|
||||
'find the gnupg executable.')
|
||||
|
||||
|
||||
available = (gnupg is not None)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user