mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 18:47:09 -07:00
Fix uTorrent with Python3 (#1644)
* Remove temp workaround for Microsoft Azure python issues.
This commit is contained in:
parent
9d05d6c914
commit
5714540949
2 changed files with 26 additions and 26 deletions
|
@ -24,42 +24,42 @@ jobs:
|
|||
maxParallel: 4
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
#- script: |
|
||||
# Make sure all packages are pulled from latest
|
||||
sudo apt-get update
|
||||
#sudo apt-get update
|
||||
|
||||
# Fail out if any setups fail
|
||||
set -e
|
||||
#set -e
|
||||
|
||||
# Delete old Pythons
|
||||
rm -rf $AGENT_TOOLSDIRECTORY/Python/2.7.16
|
||||
rm -rf $AGENT_TOOLSDIRECTORY/Python/3.5.7
|
||||
rm -rf $AGENT_TOOLSDIRECTORY/Python/3.7.3
|
||||
#rm -rf $AGENT_TOOLSDIRECTORY/Python/2.7.16
|
||||
#rm -rf $AGENT_TOOLSDIRECTORY/Python/3.5.7
|
||||
#rm -rf $AGENT_TOOLSDIRECTORY/Python/3.7.3
|
||||
|
||||
# Download new Pythons
|
||||
azcopy --recursive \
|
||||
--source https://vstsagenttools.blob.core.windows.net/tools/hostedtoolcache/linux/Python/2.7.15 \
|
||||
--destination $AGENT_TOOLSDIRECTORY/Python/2.7.15
|
||||
#azcopy --recursive \
|
||||
#--source https://vstsagenttools.blob.core.windows.net/tools/hostedtoolcache/linux/Python/2.7.15 \
|
||||
#--destination $AGENT_TOOLSDIRECTORY/Python/2.7.15
|
||||
|
||||
azcopy --recursive \
|
||||
--source https://vstsagenttools.blob.core.windows.net/tools/hostedtoolcache/linux/Python/3.5.5 \
|
||||
--destination $AGENT_TOOLSDIRECTORY/Python/3.5.5
|
||||
#azcopy --recursive \
|
||||
#--source https://vstsagenttools.blob.core.windows.net/tools/hostedtoolcache/linux/Python/3.5.5 \
|
||||
#--destination $AGENT_TOOLSDIRECTORY/Python/3.5.5
|
||||
|
||||
azcopy --recursive \
|
||||
--source https://vstsagenttools.blob.core.windows.net/tools/hostedtoolcache/linux/Python/3.7.2 \
|
||||
--destination $AGENT_TOOLSDIRECTORY/Python/3.7.2
|
||||
#azcopy --recursive \
|
||||
#--source https://vstsagenttools.blob.core.windows.net/tools/hostedtoolcache/linux/Python/3.7.2 \
|
||||
#--destination $AGENT_TOOLSDIRECTORY/Python/3.7.2
|
||||
|
||||
# Install new Pythons
|
||||
original_directory=$PWD
|
||||
setups=$(find $AGENT_TOOLSDIRECTORY/Python -name setup.sh)
|
||||
for setup in $setups; do
|
||||
chmod +x $setup;
|
||||
cd $(dirname $setup);
|
||||
./$(basename $setup);
|
||||
cd $original_directory;
|
||||
done;
|
||||
displayName: 'Workaround: update apt and roll back Python versions'
|
||||
|
||||
#original_directory=$PWD
|
||||
#setups=$(find $AGENT_TOOLSDIRECTORY/Python -name setup.sh)
|
||||
#for setup in $setups; do
|
||||
#chmod +x $setup;
|
||||
#cd $(dirname $setup);
|
||||
#./$(basename $setup);
|
||||
#cd $original_directory;
|
||||
#done;
|
||||
#displayName: 'Workaround: update apt and roll back Python versions'
|
||||
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '$(python.version)'
|
||||
|
|
|
@ -59,7 +59,7 @@ class UTorrentClient(object):
|
|||
url = urljoin(self.base_url, 'token.html')
|
||||
response = self.opener.open(url)
|
||||
token_re = "<div id='token' style='display:none;'>([^<>]+)</div>"
|
||||
match = re.search(token_re, response.read())
|
||||
match = re.search(token_re, str(response.read()))
|
||||
return match.group(1)
|
||||
|
||||
def list(self, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue