aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bernard <jbernard@tuxion.com>2014-06-13 14:32:35 -0400
committerJon Bernard <jbernard@tuxion.com>2014-06-13 14:32:35 -0400
commit31504153c442567bd2c861e986f6417b0b798cd1 (patch)
tree318bbf165170058b98fa87464141ce6dd0b1d6a2
parentd8f7745bd96dd6b23e77d531e68242344fb43bfb (diff)
downloadporterbox-31504153c442567bd2c861e986f6417b0b798cd1.zip
Print the tally of machines found at the end
-rwxr-xr-xporterbox4
1 files changed, 4 insertions, 0 deletions
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))