1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-16 15:57:04 +00:00

wic: Completely remove all urlgrabber references

The previous commit, 'wic: Remove 3rdparty/urlgrabber' didn't actually
remove all references to urlgrabber - this does however.

(From OE-Core rev: b4367af770611174d9de82c63c697d4347e30dcf)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Tom Zanussi
2014-09-09 11:21:59 -05:00
committed by Richard Purdie
parent 7576bd9982
commit 5bef32283f
2 changed files with 2 additions and 114 deletions
-29
View File
@@ -44,7 +44,6 @@ This module also exports several functions:
have a version= comment in it.
"""
import imputil, re, sys
from urlgrabber import urlopen
import gettext
_ = lambda x: gettext.ldgettext("pykickstart", x)
@@ -132,34 +131,6 @@ def versionToString(version, skipDevel=False):
raise KickstartVersionError(_("Unsupported version specified: %s") % version)
def versionFromFile(f):
"""Given a file or URL, look for a line starting with #version= and
return the version number. If no version is found, return DEVEL.
"""
v = DEVEL
fh = urlopen(f)
while True:
try:
l = fh.readline()
except StopIteration:
break
# At the end of the file?
if l == "":
break
if l.isspace() or l.strip() == "":
continue
if l[:9] == "#version=":
v = stringToVersion(l[9:].rstrip())
break
fh.close()
return v
def returnClassForVersion(version=DEVEL):
"""Return the class of the syntax handler for version. version can be
either a string or the matching constant. Raises KickstartValueError