From: salimfadhley Date: Wed, 4 Jul 2012 23:06:33 +0000 (+0100) Subject: Fix python grammar for 3 compatibility X-Git-Tag: v0.2.23~282 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e8373157091c1d6904609d26864bca64793719f;p=tools%2Fpython-jenkinsapi.git Fix python grammar for 3 compatibility --- diff --git a/examples/search_artifact_by_regexp.py b/examples/search_artifact_by_regexp.py index 57b03f7..491e4d2 100644 --- a/examples/search_artifact_by_regexp.py +++ b/examples/search_artifact_by_regexp.py @@ -1,8 +1,8 @@ -from jenkinsapi.api import search_artifact_by_regexp -import re - -jenkinsurl = "http://localhost:8080/jenkins" -jobid = "test1" -artifact_regexp = re.compile("test1\.txt") # A file name I want. -result = search_artifact_by_regexp(jenkinsurl, jobid, artifact_regexp) -print repr(result) +from jenkinsapi.api import search_artifact_by_regexp +import re + +jenkinsurl = "http://localhost:8080/jenkins" +jobid = "test1" +artifact_regexp = re.compile("test1\.txt") # A file name I want. +result = search_artifact_by_regexp(jenkinsurl, jobid, artifact_regexp) +print((repr(result))) diff --git a/examples/search_artifacts.py b/examples/search_artifacts.py index 94294cc..5ad7080 100644 --- a/examples/search_artifacts.py +++ b/examples/search_artifacts.py @@ -1,7 +1,7 @@ -from jenkinsapi.api import search_artifacts - -jenkinsurl = "http://localhost:8080/jenkins" -jobid = "test1" -artifact_ids = [ "test1.txt", "test2.txt" ] # I need a build that contains all of these -result = search_artifacts(jenkinsurl, jobid, artifact_ids) -print repr(result ) +from jenkinsapi.api import search_artifacts + +jenkinsurl = "http://localhost:8080/jenkins" +jobid = "test1" +artifact_ids = [ "test1.txt", "test2.txt" ] # I need a build that contains all of these +result = search_artifacts(jenkinsurl, jobid, artifact_ids) +print((repr(result )))