Skip to content

Commit

Permalink
Update process-cmsdist
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar authored Jun 12, 2024
1 parent 2750228 commit 73002b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions process-cmsdist
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# Create a json file from CMSDIST config.map file.

from urllib2 import urlopen
from urllib.request import urlopen
import json

CONFIG_MAP_URL = "https://raw.githubusercontent.com/cms-sw/cms-bot/HEAD/config.map"

if __name__ == "__main__":
f = urlopen(CONFIG_MAP_URL)
lines = f.read()
lines = f.read().decode()
entries = [p.strip(";").split(";") for p in lines.split()]
pairs = [dict([i.split("=") for i in e]) for e in entries]
print json.dumps(pairs, sort_keys=True, indent=2, separators=(',', ': '))
print (json.dumps(pairs, sort_keys=True, indent=2, separators=(',', ': ')))

0 comments on commit 73002b8

Please sign in to comment.