File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,8 @@ def extractTagFromFile(
8282 if jsonTag in jsonFile :
8383 print ("[WARN] Overwriting Tag" , jsonTag )
8484
85- # Open file
8685 try :
87- searchFilePath = file
88- with open (searchFilePath ) as f :
86+ with open (file ) as f :
8987 content = f .read ()
9088
9189 parsedMetrics = re .findall (pattern , content , re .M )
@@ -110,12 +108,12 @@ def extractTagFromFile(
110108 else :
111109 # Only print a warning if the defaultNotFound is not set
112110 print (
113- "[WARN] Tag {} not found in {}." .format (jsonTag , searchFilePath ),
111+ "[WARN] Tag {} not found in {}." .format (jsonTag , file ),
114112 "Will use {}." .format (defaultNotFound ),
115113 )
116114 jsonFile [jsonTag ] = defaultNotFound
117115 except IOError :
118- print ("[ERROR] Failed to open file:" , searchFilePath )
116+ print ("[ERROR] Failed to open file:" , file )
119117 jsonFile [jsonTag ] = "ERR"
120118
121119
You can’t perform that action at this time.
0 commit comments