def checkModule(name): installed = hasModule(name) if installed: if not args.get("quiet") and args.get("clean"): print wireutils.format("m {name}: y", name = name) elif not args.get("quiet"): wireutils.color_print("Module {name} installed.", name = name, color = wireutils.ansi_colors.GREEN) else: if args.get("clean"): print wireutils.format("m {name}: n", name = name) else: wireutils.color_print("Module {name} not installed.", name = name, color = wireutils.ansi_colors.RED) return installed
def checkApplication(name, friendlyName, tutorial): installed = spawn.find_executable(name) != None if installed: if not args.get("quiet") and args.get("clean"): print wireutils.format("a {name}: y", name = name) elif not args.get("quiet"): wireutils.color_print("Executable {name} ({readable}) found.", name = name, readable = friendlyName, color=wireutils.ansi_colors.GREEN) else: if args.get("clean"): print wireutils.format("a {name}: n", name = name) else: wireutils.color_print("Executable {name} ({readable}) not found.", name = name, readable = friendlyName, color=wireutils.ansi_colors.RED) if not installed and not args.get("dry"): manualInstallNotify(friendlyName, tutorial)