Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/profiles.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-05-12 10:58:46 +0000
committerGitHub <noreply@github.com>2021-05-12 10:58:46 +0000
commitdf6c4e77f721da2b03a510548d281992b25987b2 (patch)
treefc5556c89356cf19140c236d64ba34a368565e63 /archinstall/lib/profiles.py
parent0ef8cc579eba15803f542947c56a15ab9807b09c (diff)
parentaf3d65cc98632042b3b0ef62cfc27553261ec3b0 (diff)
Merge pull request #427 from advaithm/mypy
some type hint fixes and a bad catch fix
Diffstat (limited to 'archinstall/lib/profiles.py')
-rw-r--r--archinstall/lib/profiles.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py
index 06237c1c..1feba1cd 100644
--- a/archinstall/lib/profiles.py
+++ b/archinstall/lib/profiles.py
@@ -1,3 +1,4 @@
+from typing import Optional
import os, urllib.request, urllib.parse, ssl, json, re
import importlib.util, sys, glob, hashlib, logging
from collections import OrderedDict
@@ -49,7 +50,7 @@ def list_profiles(filter_irrelevant_macs=True, subpath='', filter_top_level_prof
except urllib.error.HTTPError as err:
print(f'Error: Listing profiles on URL "{profiles_url}" resulted in:', err)
return cache
- except:
+ except json.decoder.JSONDecodeError as err:
print(f'Error: Could not decode "{profiles_url}" result as JSON:', err)
return cache
@@ -215,7 +216,7 @@ class Profile(Script):
return True
@property
- def packages(self) -> list:
+ def packages(self) -> Optional[list]:
"""
Returns a list of packages baked into the profile definition.
If no package definition has been done, .packages() will return None.