def get_protected_settings(self, settings_source):
user_backend = settings_source.get('<STR_LIT>')<EOL>found_settings = dict()<EOL>for setting_name in self.__PROTECTED_SETTINGS:<EOL><INDENT>if settings_source.get(setting_name):<EOL><INDENT>continue<EOL><DEDENT>setting = None<EOL>identifier = "<STR_LIT>" % (self.__name__, setting_name)<EOL>if hasattr(self, '<STR_LIT>') and setting_name in getattr(self, '<STR_LIT>'):<EOL><INDENT>setting = self.get_setting_from_keyring(identifier, user_backend)<EOL><DEDENT>elif hasattr(self, setting_name):<EOL><INDENT>setting = self.get_setting_from_keyring(identifier, user_backend)<EOL><DEDENT>if setting:<EOL><INDENT>found_settings.update({setting_name: setting})<EOL><DEDENT><DEDENT>return found_settings<EOL>
Attempt to retrieve protected settings from keyring if they are not already set.