tidied up a little

This commit is contained in:
Tristan Rowley
2020-01-10 17:59:27 +00:00
parent c2aad15f68
commit ee49f7ea7b

View File

@@ -106,7 +106,7 @@ class Data(object):
custom_file = self.MIDI_MAPPING_JSON.replace(".json","_%s.json"%device_name) custom_file = self.MIDI_MAPPING_JSON.replace(".json","_%s.json"%device_name)
if os.path.isfile(self.PATH_TO_DATA_OBJECTS + custom_file): if os.path.isfile(self.PATH_TO_DATA_OBJECTS + custom_file):
self.midi_mappings = self._read_json(custom_file) self.midi_mappings = self._read_json(custom_file)
self.message_handler.set_message('INFO', "Loaded %s for %s" % (custom_file, device_name)) #the slot you pressed is empty') self.message_handler.set_message('INFO', "Loaded %s for %s" % (custom_file, device_name))
print ("loaded custom midi mapping for %s" % custom_file) print ("loaded custom midi mapping for %s" % custom_file)
else: else:
print ("loading default midi mapping for %s" % (device_name)) print ("loading default midi mapping for %s" % (device_name))
@@ -135,7 +135,7 @@ class Data(object):
def _read_plugin_json(self, file_name): def _read_plugin_json(self, file_name):
for path in self.PATHS_TO_PLUGIN_DATA: for path in self.PATHS_TO_PLUGIN_DATA:
print("trying path %s"%path) print("loading plugin data %s" % path)
try: try:
with open("%s/%s" % (path,file_name)) as data_file: with open("%s/%s" % (path,file_name)) as data_file:
data = json.load(data_file) data = json.load(data_file)