From 2ea825d2435a9e8f457b1d48ea6294a2e184eaed Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 21 Jul 2020 20:38:16 +0200
Subject: [PATCH] DerivationFrameworkCore: python 3 fixes

dict items() returns an iterator with py3.  (better fix)
---
 .../DerivationFrameworkCore/python/ContentHandler.py           | 3 ++-
 .../DerivationFrameworkCore/python/SlimmingHelper.py           | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ContentHandler.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ContentHandler.py
index 5c4ebc5b734..898d991d6c0 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ContentHandler.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ContentHandler.py
@@ -15,7 +15,8 @@ class ContentHandler:
 		self.ContainersForExpansion = ContainersForExpansion
 	
 	def mainContainerLine(self,containerName):
-		theDictionary = dict(list(self.NamesAndTypes.items()) + list(self.AppendToDictionary.items()))
+		theDictionary = self.NamesAndTypes.copy()
+		theDictionary.update (self.AppendToDictionary)
 		line = ''
 		if containerName in theDictionary.keys():
 			line = theDictionary[containerName]+"#"+containerName
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
index c67cd00f1f4..38393d5a747 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
@@ -232,7 +232,8 @@ class SlimmingHelper:
                 for item in mainEntries:
                         Stream.AddItem(item)
                 for item in auxEntries.keys():
-                        theDictionary = dict(list(self.NamesAndTypes.items()) + list(self.AppendToDictionary.items()))
+                        theDictionary = self.NamesAndTypes.copy()
+                        theDictionary.update (self.AppendToDictionary)
                         if item in theDictionary.keys():
                                 if (theDictionary[item]=='xAOD::JetAuxContainer'):
                                         entry = "xAOD::JetAuxContainer#"+item+"."
-- 
GitLab