MCPcopy Index your code
hub / github.com/archlinux/archinstall / __exit__

Method __exit__

archinstall/lib/installer.py:140–172  ·  view source on GitHub ↗
(self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None)

Source from the content-addressed store, hash-verified

138 return self
139
140 def __exit__(self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None) -> bool | None:
141 if exc_type is not None:
142 error(str(exc_value))
143
144 self.sync_log_to_install_medium()
145
146 # We avoid printing /mnt/<log path> because that might confuse people if they note it down
147 # and then reboot, and an identical log file will be found in the ISO medium anyway.
148 print(tr('[!] A log file has been created here: {}').format(logger.path))
149 print(tr('Please submit this issue (and file) to https://github.com/archlinux/archinstall/issues'))
150
151 # Return None to propagate the exception
152 return None
153
154 info(tr('Syncing the system...'))
155 os.sync()
156
157 if not (missing_steps := self.post_install_check()):
158 msg = f'Installation completed without any errors.\nLog files temporarily available at {logger.directory}.\nYou may reboot when ready.\n'
159 log(msg, fg='green')
160 self.sync_log_to_install_medium()
161 return True
162 else:
163 warn('Some required steps were not successfully installed/configured before leaving the installer:')
164
165 for step in missing_steps:
166 warn(f' - {step}')
167
168 warn(f'Detailed error logs can be found at: {logger.directory}')
169 warn('Submit this zip file as an issue to https://github.com/archlinux/archinstall/issues')
170
171 self.sync_log_to_install_medium()
172 return False
173
174 def remove_mod(self, mod: str) -> None:
175 if mod in self._modules:

Callers

nothing calls this directly

Calls 9

post_install_checkMethod · 0.95
errorFunction · 0.90
trFunction · 0.90
infoFunction · 0.90
logFunction · 0.90
warnFunction · 0.90
formatMethod · 0.80
syncMethod · 0.80

Tested by

no test coverage detected