aboutsummaryrefslogtreecommitdiff
path: root/ssh-what-repos.py
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-what-repos.py')
-rwxr-xr-xssh-what-repos.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/ssh-what-repos.py b/ssh-what-repos.py
index 3e09720..6ecf6ed 100755
--- a/ssh-what-repos.py
+++ b/ssh-what-repos.py
@@ -4,12 +4,9 @@
# listing. Not useful unless you have an SSH account, sorry, and not
# really all that much more interesting than normal gitolite output.
-import json, subprocess
+from json import loads
+from subprocess import check_output
-cmd = "ssh git@git.cryptech.is info -json -lc"
-
-info = json.loads(subprocess.check_output(cmd.split()))
-
-for name in sorted(info["repos"]):
- if name != "gitolite-admin" and not any(c in name for c in "*?[]"):
- print name
+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