Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/rankmirrors.py.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/rankmirrors.py.in b/scripts/rankmirrors.py.in
index 04a490ac..0c50bdd8 100644
--- a/scripts/rankmirrors.py.in
+++ b/scripts/rankmirrors.py.in
@@ -121,11 +121,15 @@ if __name__ == "__main__":
print args[0], ':', "%.2f" % serverToTime
sys.exit(0)
- if not os.path.isfile(args[0]):
+ if not os.path.isfile(args[0]) and args[0] != "-":
print >>sys.stderr, 'rankmirrors: file', args[0], 'does not exist.'
sys.exit(1)
- fl = open(args[0], 'r')
+ if args[0] == "-":
+ fl = sys.stdin
+ else:
+ fl = open(args[0], 'r')
+
serverToTime = {}
if options.times:
print 'Querying servers, this may take some time...'