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:
committed by
Richard Purdie
parent
7576bd9982
commit
5bef32283f
-29
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user