Renaming variable that masks one in outer scope
authorHugh Brown <hbrown@amplify.com>
Thu, 10 Oct 2013 22:47:41 +0000 (18:47 -0400)
committerHugh Brown <hbrown@amplify.com>
Thu, 10 Oct 2013 23:31:12 +0000 (19:31 -0400)
jenkinsapi/jenkins.py

index 0371c1b9fe04927222a3c0216c3abb3bcff8c81a..6320e3d1bacfd4420ad73bce64de90efca0c6390 100644 (file)
@@ -112,7 +112,7 @@ class Jenkins(JenkinsBase):
         """
         return jobname in self
 
-    def create_job(self, jobname, config):
+    def create_job(self, jobname, config_):
         """
         Create a job
         :param jobname: name of new job, str
@@ -123,9 +123,9 @@ class Jenkins(JenkinsBase):
             return self[jobname]
 
         params = {'name': jobname}
-        if isinstance(config, unicode):
-            config = str(config)
-        self.requester.post_xml_and_confirm_status(self.get_create_url(), data=config, params=params)
+        if isinstance(config_, unicode):
+            config_ = str(config_)
+        self.requester.post_xml_and_confirm_status(self.get_create_url(), data=config_, params=params)
         self.poll()
         if not self.has_job(jobname):
             raise JenkinsAPIException('Cannot create job %s' % jobname)