#NEWLINE# def guess_grub_version( chroot = '' ) : #NEWLINE# #INDENT# grub_install = guess_grub_install ( chroot = version ) #NEWLINE# LOG . debug ( ( 'Trying to run %s --version' % grub_install ) ) #NEWLINE# cmd = [ grub_install , '--version' ] #NEWLINE# if chroot : #NEWLINE# #INDENT# cmd [ : 0 ] = [ 'chroot' , chroot ] #NEWLINE# #UNINDENT# result = utils . execute ( * cmd ) #NEWLINE# version = ( 1 if ( result [ 0 ] . find ( '0.97' ) > 0 ) else 2 ) #NEWLINE# LOG . debug ( ( 'Looks like grub version is %s' % version ) ) #NEWLINE# return version