Skip to content

mimetype not alwats present as key #3

Description

@wizardofzos

Try CBT 888 for instance.... one of the members get's parsed like this:

"DUMPFILE": {
 "ttr": 97,
 "alias": True,
 "halfwords": 34,
 "notes": 1,
 "parms": "b"\\ x00\\ x00\\ x00\\ x00\\....",
 "ispf": False
},

Then the mimetype isn't there.....

Posting as an issue as I might try and create a PR that will always fill all the 'dict-keys' so post processing doesn't have to to things like this..

if 'mimetype' in xmijson['file'][dsnam]['members'][m]:
    mt = xmijson['file'][dsnam]['members'][m]['mimetype']
else:
    mt = 'application/octet-stream' # force it :)

The same is true (as seen in JSON above) for datatype and extension

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions