summaryrefslogtreecommitdiff
path: root/countdistros.py
diff options
context:
space:
mode:
Diffstat (limited to 'countdistros.py')
-rwxr-xr-xcountdistros.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/countdistros.py b/countdistros.py
index ccdb19c..08b242e 100755
--- a/countdistros.py
+++ b/countdistros.py
@@ -5,7 +5,9 @@ import re
import sys
# array of distro names (EDIT THIS AND PROBABLY USE CAPITALIZATION)
-arr = [ 'Ubuntu', 'Linux Mint', 'Pop!_OS', 'Debian', 'Arch Linux', 'Manjaro Linux', 'Fedora' ]
+arr = ['Ubuntu', 'Linux Mint', 'Pop!_OS', 'Debian', 'Arch Linux',
+ 'Manjaro Linux', 'Fedora']
+
def get_count(distro, db, data):
# print how many times distro appears in report
@@ -30,7 +32,7 @@ def get_data(filename='reports_piiremoved.json'):
try:
with open(filename) as file:
db = json.load(file)
- except:
+ except Exception:
err = filename + ' doesn\'t exist or isn\'t valid json!'
print(err)
sys.exit(1)