MCPcopy
hub / github.com/corpnewt/gibMacOS / pick_macos

Method pick_macos

gibMacOS.py:599–627  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

597 self.get_catalog_data()
598
599 def pick_macos(self):
600 self.resize()
601 self.u.head("Select Max macOS Version")
602 print("Currently set to {}".format(self.num_to_macos(self.current_macos,for_url=False)))
603 print("")
604 print("M. Main Menu")
605 print("Q. Quit")
606 print("")
607 print("Please type the max macOS version for the catalog url")
608 menu = self.u.grab("eg. 10.15 for Catalina, 11 for Big Sur, 12 for Monterey: ")
609 if not len(menu):
610 self.pick_macos()
611 return
612 if menu[0].lower() == "m":
613 return
614 elif menu[0].lower() == "q":
615 self.u.custom_quit()
616 # At this point - we should have something in the proper format
617 version = self.macos_to_num(menu)
618 if not version: return
619 self.current_macos = version
620 self.save_settings()
621 # At this point, we should be good - set teh catalog
622 # data - but if it fails, remove the listed prods
623 if not self.get_catalog_data():
624 self.catalog_data = None
625 self.u.grab("\nPress [enter] to return...")
626 self.pick_macos()
627 return
628
629 def main(self, dmg = False):
630 lines = []

Callers 1

mainMethod · 0.95

Calls 8

resizeMethod · 0.95
num_to_macosMethod · 0.95
macos_to_numMethod · 0.95
save_settingsMethod · 0.95
get_catalog_dataMethod · 0.95
headMethod · 0.80
grabMethod · 0.80
custom_quitMethod · 0.80

Tested by

no test coverage detected