Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Documenting a quirk of this function that could lead to clobbering
Browse files Browse the repository at this point in the history
pre-existing unit metadata, and how to avoid that.

re #101
  • Loading branch information
mhrivnak committed Feb 2, 2015
1 parent c800605 commit dcc2de5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/pulp/plugins/util/publish_step.py
Expand Up @@ -1080,6 +1080,10 @@ def _dict_to_unit(self, unit_dict):
This should be overridden in a subclass.
Any keys in the "metadata" dict on the returned unit will overwrite the
corresponding values that are currently saved in the unit's metadata.
Thus, a plugin should use an empty dict for the metadata.
:param unit_dict: a flat dictionary that has all unit key, metadata,
etc. keys at the root level, representing a unit
in pulp
Expand Down

0 comments on commit dcc2de5

Please sign in to comment.