Skip to content

Commit

Permalink
removed use of wget. Using urlib2 instead.
Browse files Browse the repository at this point in the history
Removed unused script file
  • Loading branch information
schandrika authored and schandrika committed Jun 24, 2019
1 parent 78693a7 commit 4d48d0d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 689 deletions.
11 changes: 7 additions & 4 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
import sys

import os
import urllib2
from distutils.version import LooseVersion
import traceback

Expand Down Expand Up @@ -287,7 +288,6 @@ def install_rabbit(rmq_install_dir):

sys.exit(60)

import wget
if rmq_install_dir == default_rmq_dir and not os.path.exists(
default_rmq_dir):
os.makedirs(default_rmq_dir)
Expand All @@ -309,9 +309,12 @@ def install_rabbit(rmq_install_dir):
"Skipping rabbitmq server install".format(
rmq_install_dir, rabbitmq_server))
else:
filename = wget.download(
"https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.7/rabbitmq-server-generic-unix-3.7.7.tar.xz",
out=os.path.expanduser("~"))
url = "https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.7/rabbitmq-server-generic-unix-3.7.7.tar.xz"
f = urllib2.urlopen(url)
data = f.read()
filename = "rabbitmq-server.download.tar.xz"
with open(filename, "wb") as imgfile:
imgfile.write(data)
_log.info("\nDownloaded rabbitmq server")
cmd = ["tar",
"-xf",
Expand Down
9 changes: 5 additions & 4 deletions ci-integration/mongowrapper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import shutil
import subprocess
import urllib2


def installmongo():
Expand All @@ -13,10 +14,10 @@ def installmongo():
shutil.rmtree(mongodir)

version_url = "https://fastdl.mongodb.org/linux/{}".format(mongofile)
local_filename = version_url.split('/')[-1]

cmd = ['wget', version_url]
ret = subprocess.check_call(cmd)
f = urllib2.urlopen(version_url)
data = f.read()
with open(mongofile, "wb") as img_file:
img_file.write(data)
cmd = ['tar', '-zxvf', mongofile]
ret = subprocess.check_call(cmd)
cmd = ['mkdir', '-p', 'mongodb']
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ modbus-tk==0.5.8
PyYAML==3.12
cryptography==2.2.2
service-identity==17.0.0
wget==3.2
argon2_cffi==19.1.0
passlib==1.7.1
pyjwt==1.7.1
Expand Down
Loading

0 comments on commit 4d48d0d

Please sign in to comment.