mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-26 08:39:08 +01:00
Check for sock lib has installed
This commit is contained in:
parent
aea8ff35a6
commit
54dd376b9c
@ -15,7 +15,6 @@ import imaplib
|
|||||||
import mimetypes
|
import mimetypes
|
||||||
import poplib
|
import poplib
|
||||||
import re
|
import re
|
||||||
import socks
|
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
@ -87,6 +86,11 @@ def process_queue(q, quiet=False):
|
|||||||
print "Processing: %s" % q
|
print "Processing: %s" % q
|
||||||
|
|
||||||
if q.socks_proxy_type and q.socks_proxy_host and q.socks_proxy_port:
|
if q.socks_proxy_type and q.socks_proxy_host and q.socks_proxy_port:
|
||||||
|
try:
|
||||||
|
import socks
|
||||||
|
except ImportError:
|
||||||
|
raise ImportError("Queue has been configured with proxy settings, but no socks library was installed. Try to install PySocks via pypi.")
|
||||||
|
|
||||||
proxy_type = {
|
proxy_type = {
|
||||||
'socks4': socks.SOCKS4,
|
'socks4': socks.SOCKS4,
|
||||||
'socks5': socks.SOCKS5,
|
'socks5': socks.SOCKS5,
|
||||||
|
Loading…
Reference in New Issue
Block a user