[Cryptech-Commits] [user/sra/build-tools] branch master updated: Python 2 -> 3
git at cryptech.is
git at cryptech.is
Sun Mar 22 17:27:40 UTC 2020
This is an automated email from the git hooks/post-receive script.
sra at hactrn.net pushed a commit to branch master
in repository user/sra/build-tools.
The following commit(s) were added to refs/heads/master by this push:
new 6e7acd7 Python 2 -> 3
6e7acd7 is described below
commit 6e7acd77707c16aa79cec22238ef944682d9184b
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Sun Mar 22 17:27:24 2020 +0000
Python 2 -> 3
---
https-sync-repos.py | 8 ++++----
https-what-repos.py | 2 +-
ssh-sync-repos.py | 8 ++++----
ssh-what-repos.py | 2 +-
verilog-integer.py | 2 +-
what-branches.py | 4 ++--
what-remotes.py | 4 ++--
7 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/https-sync-repos.py b/https-sync-repos.py
index 4b4c735..13766e3 100755
--- a/https-sync-repos.py
+++ b/https-sync-repos.py
@@ -23,16 +23,16 @@ for elt in ElementTree(file = urlopen(trac_page)).iter("{http://www.w3.org/1999/
url = elt.text
repo = url[len(head):-len(tail)]
pull = isdir(repo)
- print
- print url
+ print("")
+ print(url)
try:
if pull:
check_call(("git", "fetch", "--all", "--prune"), cwd = repo)
- check_call(("git", "pull"), cwd = repo)
+ check_call(("git", "merge"), cwd = repo)
else:
check_call(("git", "clone", url, repo))
except:
- print "** Error", "pulling" if pull else "cloning", repo
+ print("** Error", "pulling" if pull else "cloning", repo)
errs += 1
exit(errs)
diff --git a/https-what-repos.py b/https-what-repos.py
index eec3e39..9237f76 100755
--- a/https-what-repos.py
+++ b/https-what-repos.py
@@ -11,4 +11,4 @@ url = "https://wiki.cryptech.is/wiki/GitRepositories"
for x in ElementTree(file = urlopen(url)).iter("{http://www.w3.org/1999/xhtml}code"):
if x.text.startswith("https://git.cryptech.is/") and x.text.endswith(".git"):
- print x.text
+ print(x.text)
diff --git a/ssh-sync-repos.py b/ssh-sync-repos.py
index fd418e4..2cedac3 100755
--- a/ssh-sync-repos.py
+++ b/ssh-sync-repos.py
@@ -16,16 +16,16 @@ errs = 0
for repo in sorted(info["repos"]):
try:
if all(c not in repo for c in "*?[]"):
- print
- print repo
+ print("")
+ print(repo)
pull = isdir(repo)
if pull:
check_call(("git", "fetch", "--all", "--prune"), cwd = repo)
- check_call(("git", "pull"), cwd = repo)
+ check_call(("git", "merge"), cwd = repo)
else:
check_call(("git", "clone", "{}:{}.git".format(user, repo), repo))
except:
- print "** Error", "pulling" if pull else "cloning", repo
+ print("** Error", "pulling" if pull else "cloning", repo)
errs += 1
exit(errs)
diff --git a/ssh-what-repos.py b/ssh-what-repos.py
index 6ecf6ed..2b81056 100755
--- a/ssh-what-repos.py
+++ b/ssh-what-repos.py
@@ -9,4 +9,4 @@ from subprocess import check_output
for repo in sorted(loads(check_output("ssh git at git.cryptech.is info -json -lc".split()))["repos"]):
if repo != "gitolite-admin" and not any(c in repo for c in "*?[]"):
- print repo
+ print(repo)
diff --git a/verilog-integer.py b/verilog-integer.py
index 5186f44..f7eee40 100644
--- a/verilog-integer.py
+++ b/verilog-integer.py
@@ -57,7 +57,7 @@ class VerilogInteger(object):
if __name__ == "__main__":
def show(*args):
- print "{:20} | {:20} | {:20}".format(*args)
+ print("{:20} | {:20} | {:20}".format(*args))
show("C", "Verilog", "Input")
show("-" * 20, "-" * 20, "-" * 20)
diff --git a/what-branches.py b/what-branches.py
index 56e2082..34672cc 100755
--- a/what-branches.py
+++ b/what-branches.py
@@ -9,6 +9,6 @@ from sys import argv
for root in argv[1:] or listdir("."):
for head, dirs, files in walk(root):
if ".git" in dirs and not head.endswith("/gitolite"):
- print head
+ print(head)
for line in check_output(("git", "branch", "-a"), cwd = head).splitlines():
- print " ", line
+ print(" ", line)
diff --git a/what-remotes.py b/what-remotes.py
index 0359301..0c36467 100755
--- a/what-remotes.py
+++ b/what-remotes.py
@@ -9,6 +9,6 @@ from sys import argv
for root in argv[1:] or listdir("."):
for head, dirs, files in walk(root):
if ".git" in dirs and not head.endswith("/gitolite"):
- print head
+ print(head)
for line in check_output(("git", "remote", "-v"), cwd = head).splitlines():
- print " ", line
+ print(" ", line)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Commits
mailing list