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-15 22:54:22 +0000
committerGitHub <noreply@github.com>2021-05-15 22:54:22 +0000
commite3c8692bfa65d9b689bb50f9a4469989332adde4 (patch)
tree313530a7dc056fee85c7a2ce6e31b12dd8e61d29 /archinstall/lib/profiles.py
parent92e8cdae175c162d38253e6376a94828d1c3987a (diff)
parent0ce2ffa4cf9638ddbcace2f726e6c5ebbbe2ac75 (diff)
Merge pull request #451 from dylanmtaylor/formatting2
More formatting fixes and other quality of life improvements
Diffstat (limited to 'archinstall/lib/profiles.py')
-rw-r--r--archinstall/lib/profiles.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py
index 2f97231c..871e6223 100644
--- a/archinstall/lib/profiles.py
+++ b/archinstall/lib/profiles.py
@@ -14,7 +14,7 @@ from .storage import storage
def grab_url_data(path):
- safe_path = path[:path.find(':') + 1] + ''.join([item if item in ('/', '?', '=', '&') else urllib.parse.quote(item) for item in multisplit(path[path.find(':') + 1:], ('/', '?', '=', '&'))])
+ safe_path = path[: path.find(':') + 1] + ''.join([item if item in ('/', '?', '=', '&') else urllib.parse.quote(item) for item in multisplit(path[path.find(':') + 1:], ('/', '?', '=', '&'))])
ssl_context = ssl.create_default_context()
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE
@@ -75,7 +75,7 @@ def list_profiles(filter_irrelevant_macs=True, subpath='', filter_top_level_prof
if filter_top_level_profiles:
for profile in list(cache.keys()):
if Profile(None, profile).is_top_level_profile() is False:
- del (cache[profile])
+ del cache[profile]
return cache
@@ -154,7 +154,7 @@ class Script:
return self
def execute(self):
- if not self.namespace in sys.modules or self.spec is None:
+ if self.namespace not in sys.modules or self.spec is None:
self.load_instructions()
self.spec.loader.exec_module(sys.modules[self.namespace])
@@ -163,8 +163,10 @@ class Script:
class Profile(Script):
- def __init__(self, installer, path, args={}):
+ def __init__(self, installer, path, args=None):
super(Profile, self).__init__(path, installer)
+ if args is None:
+ args = {}
def __dump__(self, *args, **kwargs):
return {'path': self.path}