def METHOD_NAME(self, io, results, *a):
    """
    Called when QR code is loaded or operation fails. Image is then
    displayed in dialog, failure is silently ignored.
    """
    try:
        ok, contents, etag = io.load_contents_finish(results)
        if ok:
            # QR is loaded, save it to temp file and let GTK to handle
            # rest
            tf = tempfile.NamedTemporaryFile("wb", suffix=".png", delete=False)
            tf.write(contents)
            tf.close()
            self["vQR"].set_from_file(tf.name)
            os.unlink(tf.name)
    except GLib.Error as e:
        if e.code in [14, 15]:
            # Unauthorized. Grab CSRF token from daemon and try again
            log.warning("Failed to load image using glib. Retrying with urllib2.")
            self.load_data_urllib()
    except Exception as e:
        log.exception(e)
        return
    finally:
        del io