mirror of
https://github.com/munki/munki.git
synced 2026-01-23 15:39:26 -06:00
Better logic for parsing percent-done output from Big Sur's softwareupdate
This commit is contained in:
@@ -327,7 +327,7 @@ def run(options_list, catalog_url=None, stop_allowed=False):
|
||||
# Snow Leopard/Lion progress info with '-v' flag
|
||||
# Big Sur has 'downloading/Downloading' percent-done
|
||||
try:
|
||||
percent = int(output[10:].rstrip('%'))
|
||||
percent = int(output.partition(". ")[2].rstrip('%'))
|
||||
except ValueError:
|
||||
percent = -1
|
||||
display.display_percent_done(percent, 100)
|
||||
|
||||
Reference in New Issue
Block a user