Commit e0ca98b
committed
os.putenv: Avoid propagating old errors from previous function calls
grub_env_set propagated the previous (potentially unrelated) grub_errno
value, which led to spurious error messages from harmless failures. For
instance, Python searches for modules by attempting to open each
possible location, and handles errors by continuing the search; however,
a subsequent call to putenv would noisily show that error. This
resulted in a spurious error message about /boot/python/bits/efi.pyc,
even though the import call that produced that message went on to open
the correct file.
Clear grub_errno at the start of putenv to prevent this.1 parent 2207c88 commit e0ca98b
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
| |||
0 commit comments