'Check xen buildconfig for current kernel version'

def get_xen_kernel_build_ver(self):

    version = patchlevel = sublevel = ''
    extraversion = localversion = ''
    version_file = (self.build_dir + '/buildconfigs/mk.linux-2.6-xen')
    for line in open(version_file, 'r').readlines():
        if line.startswith('LINUX_VER'):
            start = (line.index('=') + 1)
            version = (line[start:].strip() + '-xen')
            break
    return version
