aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2020-03-22 17:27:24 +0000
committerRob Austein <sra@hactrn.net>2020-03-22 17:27:24 +0000
commit6e7acd77707c16aa79cec22238ef944682d9184b (patch)
treedbfce74eca04e08a908631a1976194c26702d79b
parent34ecad1d04c6b3add8077315bac1f954002fb7da (diff)
Python 2 -> 3
-rwxr-xr-xhttps-sync-repos.py8
-rwxr-xr-xhttps-what-repos.py2
-rwxr-xr-xssh-sync-repos.py8
-rwxr-xr-xssh-what-repos.py2
-rw-r--r--verilog-integer.py2
-rwxr-xr-xwhat-branches.py4
-rwxr-xr-xwhat-remotes.py4
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@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)