Comment 2 for bug 1903347

Revision history for this message
kostyarin (k-i-r) wrote :

The solution, may be, that I used locally debugging the bug

```
    if to_bytes_utf8("manual") in data:
        log.debug("Device supports manual calibration")
        data = status.StatusType10FetchUrl(func, "/Calibration/Session", "<cal:CalibrationState xmlns:cal=\\\"http://www.hp.com/schemas/imaging/con/cnx/markingagentcalibration/2009/04/08\\\" xmlns:dd=\\\"http://www.hp.com/schemas/imaging/con/dictionaries/1.0/\\\">Printing</cal:CalibrationState>")
        log.debug("data:")
        log.debug(data)

        from email import message_from_string
        headers = message_from_string(str(data, 'ASCII').split('\r\n', 1)[1])
        location = headers['Location']
        log.debug("location:")
        log.debug(location)

        data = status.StatusType10FetchUrl(func, location)
        log.debug("StatusType10FetchUrl:")
        log.debug(data)
        data = data.split(b"Session/")[1]
        log.debug(data)
        data = data.split(b"<")[0]
        log.debug(data)
        data = b"/Calibration/Session/" + data + b"/ManualSelectedPatterns.xml"
        log.debug(data)
        global calibrationSession
        calibrationSession = data.decode("utf-8")
        dev.close()
```

attention: lots of useless debug logs