#535 python-requests compatibility problem
Closed: Fixed Opened by edewata.

The following code in base/common/python/pki/system.py works fine with python-requests-0.14.1-4.fc18:

def getSecurityDomainInfo(self):
    r = self.connection.get('securityDomain/domainInfo')
    info = SecurityDomainInfo()
    info.name = r.json['DomainInfo']['@id']
    return info

With python-requests-1.1.0-3.fc18 the code will generate an error:

Traceback (most recent call last):
  File "/sbin/pkispawn", line 405, in <module>
    main(sys.argv)
  File "/sbin/pkispawn", line 366, in main
    info = parser.sd_get_info()
  File "/usr/lib/python2.7/site-packages/pki/deployment/pkiparser.py",   line 406, in sd_get_info
    return sd.getSecurityDomainInfo()
  File "/usr/lib/python2.7/site-packages/pki/system.py", line 36, in getSecurityDomainInfo
    info.name = r.json['DomainInfo']['@id']
TypeError: 'instancemethod' object has no attribute '__getitem__'

master: a3b4489e219d5807133e67b5f2b10c320ecaf8a4

Metadata Update from @edewata:
- Issue assigned to edewata
- Issue set to the milestone: 10.0.2

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/1105

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata