def _get_ibtool(): global gTool if gTool is None: if os.path.exists("/usr/bin/xcrun"): try: gTool = check_output(["/usr/bin/xcrun", "-find", "ibtool"])[:-1] except subprocess.CalledProcessError: raise IOError("Tool 'ibtool' not found") else: gTool = "ibtool" return gTool
def _get_ibtool(): global gTool if gTool is None: if os.path.exists('/usr/bin/xcrun'): try: gTool = check_output(['/usr/bin/xcrun', '-find', 'ibtool'])[:-1] except subprocess.CalledProcessError: raise IOError("Tool 'ibtool' not found") else: gTool = 'ibtool' return gTool