mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-24 16:57:02 +00:00
Move imports of urllib2 into wget() as it has caused some tricky issues with downstream code.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import subprocess
|
||||
import logging
|
||||
import urllib2
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
class OnlServiceMixin(object):
|
||||
|
||||
@@ -126,6 +124,10 @@ def dmerge(d1, d2):
|
||||
|
||||
|
||||
def wget(url, directory=None, temp_directory=None, extension=None):
|
||||
|
||||
import urllib2
|
||||
import tempfile
|
||||
|
||||
try:
|
||||
response = urllib2.urlopen(url)
|
||||
filename = os.path.basename(urllib2.urlparse.urlparse(response.url).path)
|
||||
|
||||
Reference in New Issue
Block a user