Commit 93006a45 authored by Pieter-Jan Moreels's avatar Pieter-Jan Moreels
Browse files

undo accidental code commit

parent b2325608
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ import redis
import re
import datetime
import configparser
import ntlm3
import urllib.parse
import urllib.request as req
from io import BytesIO
@@ -329,23 +328,11 @@ class Configuration():
    def getProxy(cls):
        return cls.readSetting("Proxy", "http", cls.default['http_proxy'])

    @classmethod
    def getNTLM(cls):
        user=cls.readSetting("Proxy", "domain", cls.default['http_proxy_domain'])
        user=cls.readSetting("Proxy", "user", cls.default['http_proxy_user'])
        pwd= cls.readSetting("Proxy", "password", cls.default['http_proxy_pwd'])
        return (domain, user, pwd) if doman and user and pwd else None

    @classmethod
    def getFile(cls, getfile, compressed=False):
        if cls.getProxy():
            if cls.getNTLM():
                passman = req.ProxyDigestAuthHandler()
                passman.add_password(None,  getfile, cls.getNTLM()[0], cls.getNTLM()[1])
                auth = ntlm3.HTTPNtlmAuthHandler.ProxyNtlmAuthHandler(passman)
            else:
                auth = req.HTTPBasicAuthHandler()
            proxy = req.ProxyHandler({'http': cls.getProxy(), 'https': cls.getProxy()})
            auth = req.HTTPBasicAuthHandler()
            opener = req.build_opener(proxy, auth, req.HTTPHandler)
            req.install_opener(opener)
        if not compressed:
+0 −1
Original line number Diff line number Diff line
@@ -11,4 +11,3 @@ xlrd
lxml
https://github.com/marianoguerra/feedformatter/archive/master.zip
six>=1.9.0
python-ntlm3