def AddSubkey(self, registry_key):
name = registry_key.name.upper()<EOL>if name in self._subkeys:<EOL><INDENT>raise KeyError(<EOL>'<STR_LIT>'.format(registry_key.name))<EOL><DEDENT>self._subkeys[name] = registry_key<EOL>key_path = key_paths.JoinKeyPath([self._key_path, registry_key.name])<EOL>registry_key._key_path = key_path<EOL>
Adds a subkey.

        Args:
          registry_key (WinRegistryKey): Windows Registry subkey.

        Raises:
          KeyError: if the subkey already exists.