From: Hugh Brown Date: Thu, 10 Oct 2013 22:24:44 +0000 (-0400) Subject: Do not use variables that clash with builtins (id, range, type) X-Git-Tag: v0.2.23~92^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18f20d17cd333c956d915cc17db6efd2c47597c8;p=tools%2Fpython-jenkinsapi.git Do not use variables that clash with builtins (id, range, type) --- diff --git a/jenkinsapi/invocation.py b/jenkinsapi/invocation.py index f578dab..264eb0a 100644 --- a/jenkinsapi/invocation.py +++ b/jenkinsapi/invocation.py @@ -30,7 +30,7 @@ class Invocation(object): self.job.poll() self.initial_builds = set(self.job.get_build_dict().keys()) - def __exit__(self, type, value, traceback): + def __exit__(self, type_, value, traceback): """ Finish watching the job - it will track which new queue items or builds have been created as a consequence of invoking the job. diff --git a/jenkinsapi/jenkins.py b/jenkinsapi/jenkins.py index 6320e3d..324335d 100644 --- a/jenkinsapi/jenkins.py +++ b/jenkinsapi/jenkins.py @@ -49,17 +49,17 @@ class Jenkins(JenkinsBase): else: return self.baseurl - def validate_fingerprint(self, id): - obj_fingerprint = Fingerprint(self.baseurl, id, jenkins_obj=self) + def validate_fingerprint(self, id_): + obj_fingerprint = Fingerprint(self.baseurl, id_, jenkins_obj=self) obj_fingerprint.validate() - log.info(msg="Jenkins says %s is valid" % id) + log.info(msg="Jenkins says %s is valid" % id_) # def reload(self): # '''Try and reload the configuration from disk''' # self.requester.get_url("%(baseurl)s/reload" % self.__dict__) - def get_artifact_data(self, id): - obj_fingerprint = Fingerprint(self.baseurl, id, jenkins_obj=self) + def get_artifact_data(self, id_): + obj_fingerprint = Fingerprint(self.baseurl, id_, jenkins_obj=self) obj_fingerprint.validate() return obj_fingerprint.get_info() diff --git a/jenkinsapi/result.py b/jenkinsapi/result.py index 862999b..f93e738 100644 --- a/jenkinsapi/result.py +++ b/jenkinsapi/result.py @@ -19,8 +19,8 @@ class Result(object): self_str = str(self) return "<%s.%s %s>" % (module_name, class_name, self_str) - def id(self): - """ - Calculate an ID for this object. - """ - return "%s.%s" % (self.className, self.name) + #def id(self): + # """ + # Calculate an ID for this object. + # """ + # return "%s.%s" % (self.className, self.name)