def is_luks(device):
 try:
  utils.execute('cryptsetup', 'isLuks', '--verbose', device, run_as_root=True, check_exit_code=True)
  return True
 except processutils.ProcessExecutionError as e:
  LOG.warning(_LW('isLuks exited abnormally (status %(exit_code)s): %(stderr)s'), {'exit_code': e.exit_code, 'stderr': e.stderr})
  return False

def is_luks ( device ) : try : utils . execute ( 'cryptsetup' , 'isLuks' , '--verbose' , device , run_as_root = True , check_exit_code = True ) return True except processutils . ProcessExecutionError as e : LOG . warning ( _LW ( 'isLuks exited abnormally (status %(exit_code)s): %(stderr)s' ) , { 'exit_code' : e . exit_code , 'stderr' : e . stderr } ) return False
checks if the specified device uses luks for encryption .