'Get the version of the kernel to be installed.
Returns:
The version string, as would be returned
by \'make kernelrelease\'.
Raises:
AutoservError: no package has yet been obtained. Call
DEBKernel.get() with a .deb package.'

def get_version(self):

    if (self.source_material is None):
        raise error.AutoservError('A    kernel    must    first    be    specified    via    get()')
    retval = utils.run(('dpkg-deb    -f    "%s"    version' % utils.sh_escape(self.source_material)))
    return retval.stdout.strip()
