Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import createrepo_c as cr
- module_data = {
- 'arch': 'x86_64',
- 'name': 'idm',
- 'stream': 'DL1',
- 'context': '6573b795',
- 'version': 8010020191127093529}
- def create_collection():
- col = cr.UpdateCollection()
- col.shortname = 'short name'
- module = cr.UpdateCollectionModule()
- # if you uncomment the pdb and just tell it to continue ('c'), everything will be perfect.
- # without it, values for module attributes are not set
- # import pdb; pdb.set_trace()
- module.name = module_data['name']
- module.stream = module_data['stream']
- module.version = module_data['version']
- module.context = module_data['context']
- module.arch = module_data['arch']
- col.module = module
- return col
- c = create_collection()
- print(c.module.name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement