From 0e8373157091c1d6904609d26864bca64793719f Mon Sep 17 00:00:00 2001 From: salimfadhley Date: Thu, 5 Jul 2012 00:06:33 +0100 Subject: [PATCH] Fix python grammar for 3 compatibility --- examples/search_artifact_by_regexp.py | 16 ++++++++-------- examples/search_artifacts.py | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) 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 ))) -- 2.7.4