diff --git a/plugins/pulp_rpm/plugins/importers/yum/repomd/primary.py b/plugins/pulp_rpm/plugins/importers/yum/repomd/primary.py index 79dc3b7f0..bfca3423f 100644 --- a/plugins/pulp_rpm/plugins/importers/yum/repomd/primary.py +++ b/plugins/pulp_rpm/plugins/importers/yum/repomd/primary.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from copy import deepcopy import os from pulp.server import util @@ -78,22 +77,6 @@ 'sourcerpm': None, 'files': []} -# RPM entry dictionary --------------------------------------------------------- - -# RPM entry dictionaries will make up the values in the requires and provides lists - -RPM_ENTRY_SKEL = {'name': None, - 'version': None, - 'release': None, - 'epoch': None, - 'flags': None} - -# file information dictionary -------------------------------------------------- - -# file information dictionaries will make up the values in the files lists - -FILE_INFO_SKEL = {'path': None} - # element processing methods --------------------------------------------------- @@ -107,9 +90,6 @@ def process_package_element(package_element): :return: package information dictionary :rtype: pulp_rpm.plugins.db.models.RPM """ - # NOTE the use of deepcopy relies on cpython's very sensible policy of never - # duplicating string literals, this may not hold up in other implementations - # the python interpreter. package_info = dict() name_element = package_element.find(NAME_TAG) @@ -195,9 +175,6 @@ def _process_format_element(format_element): :return: package format dictionary :rtype: dict """ - # NOTE the use of deepcopy relies on cpython's very sensible policy of never - # duplicating string literals, this may not hold up in other implementations - # the python interpreter. package_format = dict() if format_element is None: @@ -254,10 +231,7 @@ def _process_rpm_entry_element(rpm_entry_element): :return: RPM entry dictionary :rtype: dict """ - # NOTE the use of deepcopy relies on cpython's very sensible policy of never - # duplicating string literals, this may not hold up in other implementations - # the python interpreter. - rpm_entry = deepcopy(RPM_ENTRY_SKEL) + rpm_entry = dict() rpm_entry['name'] = rpm_entry_element.attrib['name'] rpm_entry['version'] = rpm_entry_element.attrib.get('ver', None) @@ -277,10 +251,7 @@ def _process_file_element(file_element): :return: file information dictionary :rtype: dict """ - # NOTE the use of deepcopy relies on cpython's very sensible policy of never - # duplicating string literals, this may not hold up in other implementations - # the python interpreter. - file_info = deepcopy(FILE_INFO_SKEL) + file_info = dict() file_info['path'] = file_element.text