index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Dylan Taylor <dylan@dylanmtaylor.com> | 2021-05-15 13:29:21 -0400 |
---|---|---|
committer | Dylan Taylor <dylan@dylanmtaylor.com> | 2021-05-15 13:29:21 -0400 |
commit | 8bc361970b413c58f3520a4b8d22f8886899da50 (patch) | |
tree | 3bc1871dd0c7a55593911d82e8f15695b90645b9 /archinstall | |
parent | dd340b9cbae197ca4f4c41c3006c4ec2858727fa (diff) |
-rw-r--r-- | archinstall/lib/general.py | 15 |
diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py index 37490e32..9f6de666 100644 --- a/archinstall/lib/general.py +++ b/archinstall/lib/general.py @@ -45,15 +45,14 @@ def locate_binary(name): class JSON_Encoder: def _encode(obj): if isinstance(obj, dict): - ## We'll need to iterate not just the value that default() usually gets passed - ## But also iterate manually over each key: value pair in order to trap the keys. + # We'll need to iterate not just the value that default() usually gets passed + # But also iterate manually over each key: value pair in order to trap the keys. copy = {} for key, val in list(obj.items()): if isinstance(val, dict): - val = json.loads(json.dumps(val, cls=JSON)) # This, is a EXTREMELY ugly hack.. - # But it's the only quick way I can think of to - # trigger a encoding of sub-dictionaries. + # This, is a EXTREMELY ugly hack.. but it's the only quick way I can think of to trigger a encoding of sub-dictionaries. + val = json.loads(json.dumps(val, cls=JSON)) else: val = JSON_Encoder._encode(val) @@ -84,7 +83,7 @@ class JSON(json.JSONEncoder, json.JSONDecoder): def encode(self, obj): return super(JSON, self).encode(self._encode(obj)) -class sys_command():#Thread): +class sys_command: """ Stolen from archinstall_gui """ @@ -128,7 +127,7 @@ class sys_command():#Thread): user_catalogue = os.path.expanduser('~') - if (workdir := kwargs.get('workdir', None)): + if workdir := kwargs.get('workdir', None): self.cwd = workdir self.exec_dir = workdir else: @@ -275,7 +274,7 @@ class sys_command():#Thread): if broke: continue - ## Adding a exit trigger: + # Adding a exit trigger: if len(self.kwargs['events']) == 0: if 'debug' in self.kwargs and self.kwargs['debug']: self.log(f"Waiting for last command {self.cmd[0]} to finish.", level=logging.DEBUG) |