def additions_version():
 try:
  d = _additions_dir()
 except EnvironmentError:
  return False
 if (d and (len(os.listdir(d)) > 0)):
  return re.sub('^{0}-'.format(_additions_dir_prefix), '', os.path.basename(d))
 return False

def additions_version ( ) : try : d = _additions_dir ( ) except EnvironmentError : return False if ( d and ( len ( os . listdir ( d ) ) > 0 ) ) : return re . sub ( '^{0}-' . format ( _additions_dir_prefix ) , '' , os . path . basename ( d ) ) return False
check virtualbox guest additions version .