예제 #1
0
 def _process_mask(self, command):
     """
     We need to process a mask line as specified in the user file.
     """
     mask_command = command.values[0]
     # Use the user file parser to extract the values from the user file setting.
     user_file_parser = UserFileParser()
     parsed_output = user_file_parser.parse_line(mask_command)
     self.add_to_processed_state_settings(parsed_output)
 def _process_mask(self, command):
     """
     We need to process a mask line as specified in the user file.
     """
     mask_command = command.values[0]
     # Use the user file parser to extract the values from the user file setting.
     user_file_parser = UserFileParser()
     parsed_output = user_file_parser.parse_line(mask_command)
     self.add_to_processed_state_settings(parsed_output)
예제 #3
0
    def read_user_file(self):
        # Read in all elements
        parser = UserFileParser()

        output = {}
        with open(self._user_file) as f:
            for line in f:
                parsed = parser.parse_line(line)
                UserFileReader._add_to_output(output, parsed)

        # Provide the read elements
        return output