#NEWLINE# def set_sysfile_value( self , sysfile , value , verify = True ) : #NEWLINE# #INDENT# '\n        Set the value of the specified sysfile. By default, the value will be checked afterwards.\n        Can be overridden by setting ``verify`` parameter to ``False``.\n\n        ' #NEWLINE# value = str ( value ) #NEWLINE# self . execute ( "echo {} > '{}'" . format ( value , sysfile ) , check_exit_code = False , as_root = True ) #NEWLINE# if verify : #NEWLINE# #INDENT# output = self . get_sysfile_value ( sysfile ) #NEWLINE# if ( output . strip ( ) != value ) : #NEWLINE# #INDENT# message = 'Could not set the value of {} to {}' . format ( self , value ) #NEWLINE# raise DeviceError ( message ) #NEWLINE# #UNINDENT# #UNINDENT# self . _written_sysfiles . append ( sysfile )