Skip to content
Snippets Groups Projects
Commit cfe85d2d authored by Matthieu FAURE's avatar Matthieu FAURE :sailboat:
Browse files

Merge branch 'master' into 'master'

remove proxy and add auto-creation of the directory "paquet-appli"

See merge request !1
parents a71cefed 4a120adc
No related branches found
No related tags found
1 merge request!1remove proxy and add auto-creation of the directory "paquet-appli"
......@@ -32,7 +32,7 @@ sys.stdout = Logger("downloadsoftref.log") # capture de la sortie ecran dans le
urllib2.install_opener(
urllib2.build_opener(
urllib2.ProxyHandler({'http': 'proxyserv:80', 'https': 'proxyserv:80'})
# urllib2.ProxyHandler({'http': 'proxyserv:80', 'https': 'proxyserv:80'})
# a la place de proxyserv mettre le nom ou ip de votre proxy
)
)
......@@ -96,6 +96,10 @@ def dnlfile(url):
print "downloading " + url + "\nfichier local paquet-appli/" + filename # depot des paquets dans le sous repertoire paquet-appli/ a creer
# localfile=os.path.basename("paquet-appli/"+filename)
# Open our local file for writing
if not os.path.exists("paquet-appli"):
os.makedirs("paquet-appli")
with open("paquet-appli/" + filename, "wb") as local_file:
local_file.write(f.read())
cfgfile = open("downloadsoftref.ini", 'w+')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment