From 31504153c442567bd2c861e986f6417b0b798cd1 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Fri, 13 Jun 2014 14:32:35 -0400 Subject: Print the tally of machines found at the end --- porterbox | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/porterbox b/porterbox index 35026ef..01a628f 100755 --- a/porterbox +++ b/porterbox @@ -4,6 +4,7 @@ import bs4 import requests +machine_count = 0 machines_url = 'https://db.debian.org/machines.cgi' response = requests.get(machines_url) @@ -24,8 +25,11 @@ for machine_entry in machine_entries: architecture = machine_data[1].text.strip() if access == "": access = "[unknown]" + machine_count += 1 print('%-18s %-24s %s' % (architecture, hostname, access)) except IndexError: # malformed entry, skip it pass + +print("\nFound %d machines" % (machine_count)) -- cgit v1.2.3