From 4b5f6f44bac0723f1e5368699adc1a18cb24048b Mon Sep 17 00:00:00 2001 From: Stephen R Persky Date: Fri, 23 Sep 2022 09:24:33 -0400 Subject: [PATCH] Update showoci_service.py Add line to initialize data in the class ShowOCIService. This does not have any affect on running showoci from the command line. However this does reset data{} to empty when importing the showoci classes and running from a wrapper package. --- examples/showoci/showoci_service.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/showoci/showoci_service.py b/examples/showoci/showoci_service.py index ec1669e027..874ca780d4 100755 --- a/examples/showoci/showoci_service.py +++ b/examples/showoci/showoci_service.py @@ -475,6 +475,9 @@ class ShowOCIService(object): ########################################################################## def __init__(self, flags): + # Initiate data everytime class is instantiated + self.data = {} + if not isinstance(flags, ShowOCIFlags): raise TypeError("flags must be ShowOCIFlags class")