diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2014-09-09 11:21:59 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-10 11:31:35 +0100 |
commit | b4367af770611174d9de82c63c697d4347e30dcf (patch) | |
tree | 9d722380ad788d6e91a2d906b31d0ded19107e09 /scripts/lib/wic/3rdparty/pykickstart/version.py | |
parent | 3a98dd15f19034a1837210f764310c195f9906e1 (diff) | |
download | openembedded-core-contrib-b4367af770611174d9de82c63c697d4347e30dcf.tar.gz |
wic: Completely remove all urlgrabber references
The previous commit, 'wic: Remove 3rdparty/urlgrabber' didn't actually
remove all references to urlgrabber - this does however.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/3rdparty/pykickstart/version.py')
-rw-r--r-- | scripts/lib/wic/3rdparty/pykickstart/version.py | 29 |
1 files changed, 0 insertions, 29 deletions
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 |