From 5bef32283f53e7f1bbde81fbb95c8682e29f082a Mon Sep 17 00:00:00 2001 From: Tom Zanussi Date: Tue, 9 Sep 2014 11:21:59 -0500 Subject: 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 Signed-off-by: Richard Purdie --- scripts/lib/wic/3rdparty/pykickstart/version.py | 29 ------------------------- 1 file changed, 29 deletions(-) (limited to 'scripts/lib/wic/3rdparty/pykickstart/version.py') diff --git a/scripts/lib/wic/3rdparty/pykickstart/version.py b/scripts/lib/wic/3rdparty/pykickstart/version.py index 102cc37d80..8a8e6aad22 100644 --- a/scripts/lib/wic/3rdparty/pykickstart/version.py +++ b/scripts/lib/wic/3rdparty/pykickstart/version.py @@ -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 -- cgit v1.2.3-54-g00ecf