Skip to content

Commit

Permalink
Merge pull request #42103 from Dr15Jones/noTypeInUPD_10_6
Browse files Browse the repository at this point in the history
Changed 'type' to 'read_type' to avoid keyword class in UDP message [10_6]
  • Loading branch information
cmsbuild authored Jun 27, 2023
2 parents 6412fce + 7c1e119 commit 00258c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Utilities/StorageFactory/src/StatisticsSenderService.cc
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ void StatisticsSenderService::fillUDP(const std::string &siteName,
} else {
os << "\"fallback\": false, ";
}
os << "\"type\": ";
os << "\"read_type\": ";
switch (fileinfo.m_type) {
case edm::InputType::Primary: {
os << "\"primary\", ";
Expand Down
5 changes: 4 additions & 1 deletion Utilities/StorageFactory/test/test_file_statistics_sender.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ function testJSON {
import json
with open('test.json') as f:
for line in f:
json.loads(line)
d = json.loads(line)
for k in d.keys():
if k in ['producer', 'type', 'type_prefix', 'timestamp', 'host']:
raise RuntimeError("Found restricted keyword %s"%k)
EOF
RET=$?
if [ "x$RET" != "x0" ]; then
Expand Down

0 comments on commit 00258c1

Please sign in to comment.