~fgiff/linaro-android-bot-review/878894

« back to all changes in this revision

Viewing changes to lavaconnection.py

Upmerge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 
11
11
class LoggingTransport(xmlrpclib.Transport):
12
12
    def send_request(self, connection, handler, request_body):
13
 
        xmlroc_log.debug("%s", (connection, handler, request_body))
 
13
        xmlrpc_log.debug("%s", (connection, handler, request_body))
14
14
        return xmlrpclib.Transport.send_request(self, connection, handler, request_body)
15
15
 
16
16
 
70
70
            bundles = self.server.dashboard.bundles("%s" % (self.lava_stream))
71
71
        except xmlrpclib.Fault:
72
72
            # Problem with LAVA xmlrpc call.
73
 
            print "Error: Couldn't get test results from LAVA."
 
73
            self.log.error("Error: Couldn't get test results from LAVA.")
74
74
        except xmlrpclib.ProtocolError:
75
75
            # Problem connecting to LAVA.
76
 
            print "Error: Couldn't connect to LAVA."
 
76
            self.log.error("Error: Couldn't connect to LAVA.")
77
77
        lava_results = []
78
78
        # Since we're operating on fresh builds, we know the bundle will 
79
79
        # have been uploaded in the last 48 hrs, so prune out older ones.
96
96
                    # Not a user-friendly identifier, but we'd need to download
97
97
                    # the bundle to work out which build it corresponds to
98
98
                    # and this error occurs when we can't do that.
99
 
                    print "Error: Couldn't fetch test results for %s" % (
100
 
                        bundle["content_sha1"])
 
99
                    self.log.error("Error: Couldn't fetch test results for %s" % (
 
100
                        bundle["content_sha1"]))
101
101
                    continue
102
102
                except xmlrpclib.ProtocolError:
103
103
                    # Problem connecting to LAVA.
104
 
                    print "Error: Couldn't connect to LAVA."
 
104
                    self.log.error("Error: Couldn't connect to LAVA.")
105
105
                    continue
106
106
        return lava_results
107
107