def handle_osx(self, lbry_name):
        lbry_process = [d for d in subprocess.Popen(['ps','aux'], stdout=subprocess.PIPE).stdout.readlines()
                            if 'LBRY.app' in d and 'LBRYURIHandler' not in d]
        try:
            status = self.daemon.is_running()
        except:
            status = None

        if lbry_process or status:
            self.check_status()
            started = False
        else:
            os.system("open /Applications/LBRY.app")
            self.check_status()
            started = True

        if lbry_name == "lbry" or lbry_name == "" and not started:
            webbrowser.open(UI_ADDRESS)
        else:
            webbrowser.open(UI_ADDRESS + "/view?name=" + lbry_name)
dataset/ETHPy150Open lbryio/lbry/lbrynet/lbrynet_daemon/Apps/LBRYURIHandler.py/LBRYURIHandler.handle_osx/original