mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-25 16:18:51 +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 poplib
|
||||
import re
|
||||
import socks
|
||||
import socket
|
||||
|
||||
from datetime import timedelta
|
||||
@ -87,6 +86,11 @@ def process_queue(q, quiet=False):
|
||||
print "Processing: %s" % q
|
||||
|
||||
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 = {
|
||||
'socks4': socks.SOCKS4,
|
||||
'socks5': socks.SOCKS5,
|
||||
|
Loading…
Reference in New Issue
Block a user