def load_json(self, path):

        if os.path.exists(path):
            with codecs.open(path,'r',encoding=system_encoding) as f:
                try:
                    return json.load(f)
                except:
                    if self.debug:
                        print("Error parsing prefs from json file " + path)
                    self.prefs = default_prefs
                    option = "Edit file manually"
                    response = self.menu("There is an error opening " + path + "\n" + option)
                    if response == option:
                        self.open_file(path)
        else:
            if self.debug:
                print('Error opening json file ' + path)
                print('File does not exist')
            return False
Establish connection to the AMQP broker.
dataset/ETHPy150Open markjones112358/dmenu-extended/dmenu_extended.py/dmenu.load_json--crossover with--dataset/ETHPy150Open celery/kombu/kombu/transport/pyamqp.py/Transport.establish_connection