Merge branch 'master' into py2

This commit is contained in:
matham 2019-06-02 13:59:47 -04:00 committed by GitHub
commit 4a162f8459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View File

@ -72,7 +72,7 @@ install:
pip install --upgrade cython pillow pytest coveralls docutils PyInstaller; pip install --upgrade cython pillow pytest coveralls docutils PyInstaller;
fi; fi;
if [ "${RUN}" == "docs" ]; then if [ "${RUN}" == "docs" ]; then
python3 -m pip install --upgrade sphinxcontrib-blockdiag sphinxcontrib-seqdiag sphinxcontrib-actdiag sphinxcontrib-nwdiag; python3 -m pip install --upgrade sphinx==1.7.9 sphinxcontrib-blockdiag sphinxcontrib-seqdiag sphinxcontrib-actdiag sphinxcontrib-nwdiag;
fi; fi;
fi; fi;
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then - if [ "${TRAVIS_OS_NAME}" == "osx" ]; then

View File

@ -1,5 +1,6 @@
Cython>=0.24 Cython>=0.24
# Frozen Sphinx requirements for easier pip installation # Frozen Sphinx requirements for easier pip installation
sphinx==1.7.9
sphinxcontrib-actdiag sphinxcontrib-actdiag
sphinxcontrib-blockdiag sphinxcontrib-blockdiag
sphinxcontrib-nwdiag sphinxcontrib-nwdiag

View File

@ -331,10 +331,7 @@ class LoaderBase(object):
else: else:
# read from internet # read from internet
request = urllib_request.Request(filename) request = urllib_request.Request(filename)
if ( if Config.has_option('network', 'useragent'):
Config.has_section('network')
and 'useragent' in Config.items('network')
):
useragent = Config.get('network', 'useragent') useragent = Config.get('network', 'useragent')
if useragent: if useragent:
request.add_header('User-Agent', useragent) request.add_header('User-Agent', useragent)