You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2022/12/13 10:15:23 UTC
[cloudstack] branch main updated: git-pr py3 compatible (#6961)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 3106dba28c1 git-pr py3 compatible (#6961)
3106dba28c1 is described below
commit 3106dba28c15308adabe3ff0dfcc9a48360974ab
Author: dahn <da...@onecht.net>
AuthorDate: Tue Dec 13 02:15:13 2022 -0800
git-pr py3 compatible (#6961)
* py3 print statement
* python3
---
tools/git/git-pr | 48 ++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/tools/git/git-pr b/tools/git/git-pr
index 696e0ad1d23..3e5e97634be 100755
--- a/tools/git/git-pr
+++ b/tools/git/git-pr
@@ -69,68 +69,68 @@ else
fi
# Get vars from the GitHub API and parse the returned json
-prAuthor=$(cat ${jsonTmp} | python -c "
+prAuthor=$(cat ${jsonTmp} | python3 -c "
try:
import sys, json
- print json.load(sys.stdin)['user']['login'].encode('utf-8').decode('ascii','ignore')
+ print (json.load(sys.stdin)['user']['login'].encode('utf-8').decode('ascii','ignore'))
except:
- print ''
+ print ('')
")
-prTitle=$(cat ${jsonTmp} | python -c "
+prTitle=$(cat ${jsonTmp} | python3 -c "
try:
import sys, json
- print json.load(sys.stdin)['title'].encode('utf-8').decode('ascii','ignore')
+ print (json.load(sys.stdin)['title'].encode('utf-8').decode('ascii','ignore'))
except:
- print ''
+ print ('')
")
-prBody=$(cat ${jsonTmp} | python -c "
+prBody=$(cat ${jsonTmp} | python3 -c "
try:
import sys, json
- print json.load(sys.stdin)['body'].encode('utf-8').decode('ascii','ignore')
+ print (json.load(sys.stdin)['body'].encode('utf-8').decode('ascii','ignore'))
except:
- print ''
+ print ('')
")
-prOriginBranch=$(cat ${jsonTmp} | python -c "
+prOriginBranch=$(cat ${jsonTmp} | python3 -c "
try:
import sys, json
- print json.load(sys.stdin)['head']['label'].encode('utf-8').decode('ascii','ignore')
+ print (json.load(sys.stdin)['head']['label'].encode('utf-8').decode('ascii','ignore'))
except:
- print ''
+ print ('')
" | sed -e "s/:/\//")
-prState=$(cat ${jsonTmp} | python -c "
+prState=$(cat ${jsonTmp} | python3 -c "
try:
import sys, json
- print json.load(sys.stdin)['state'].encode('utf-8').decode('ascii','ignore')
+ print (json.load(sys.stdin)['state'].encode('utf-8').decode('ascii','ignore'))
except:
- print 'Unknown'
+ print ('Unknown')
")
-prMergeableState=$(cat ${jsonTmp} | python -c "
+prMergeableState=$(cat ${jsonTmp} | python3 -c "
try:
import sys, json
- print json.load(sys.stdin)['mergeable_state'].encode('utf-8').decode('ascii','ignore')
+ print (json.load(sys.stdin)['mergeable_state'].encode('utf-8').decode('ascii','ignore'))
except:
- print 'Unknown'
+ print ('Unknown')
")
-prDestinationBranch=$(cat ${jsonTmp} | python -c "
+prDestinationBranch=$(cat ${jsonTmp} | python3 -c "
try:
import sys, json
- print json.load(sys.stdin)['base']['ref'].encode('utf-8').decode('ascii','ignore')
+ print (json.load(sys.stdin)['base']['ref'].encode('utf-8').decode('ascii','ignore'))
except:
- print 'Unknown'
+ print ('Unknown')
")
-prCommits=$(cat ${jsonTmp} | python -c "
+prCommits=$(cat ${jsonTmp} | python3 -c "
try:
import sys, json
- print json.load(sys.stdin)['commits']
+ print (json.load(sys.stdin)['commits'])
except:
- print 'Unknown'
+ print ('Unknown')
")
# Do some sanity checking