Skip to content

Commit

Permalink
Code format: remove spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
jofemodo committed Feb 18, 2024
1 parent e3d333e commit 37d9e55
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/presets_config_handler.py
Expand Up @@ -81,7 +81,6 @@ def post(self, action):

except:
result = {}

# JSON Ouput
if result:
self.write(result)
Expand All @@ -107,7 +106,6 @@ def do_new_bank(self):
except Exception as e:
logging.error(e)
result['errors'] = "Can't create new bank: {}".format(e)

result.update(self.do_get_tree())
return result

Expand All @@ -118,7 +116,6 @@ def do_rename_bank(self):
except Exception as e:
logging.error(e)
result['errors'] = "Can't rename bank: {}".format(e)

result.update(self.do_get_tree())
return result

Expand All @@ -129,7 +126,6 @@ def do_remove_bank(self):
except Exception as e:
logging.error(e)
result['errors'] = "Can't remove bank: {}".format(e)

result.update(self.do_get_tree())
return result

Expand All @@ -140,7 +136,6 @@ def do_rename_preset(self):
except Exception as e:
logging.error(e)
result['errors'] = "Can't rename preset: {}".format(e)

result.update(self.do_get_tree())
return result

Expand All @@ -151,7 +146,6 @@ def do_remove_preset(self):
except Exception as e:
logging.error(e)
result['errors'] = "Can't remove preset: {}".format(e)

result.update(self.do_get_tree())
return result

Expand Down Expand Up @@ -183,34 +177,28 @@ def do_download(self):
break
self.write(data)
self.finish()

except Exception as e:
logging.error(e)
result = {
errors: "Can't download file: {}".format(e)
}

finally:
if fpath and delete:
os.remove(fpath)

return result

def do_search(self):
result = {}

try:
maformats = self.engine_cls.zynapi_martifact_formats()
result['search_results'] = self.search_artifacts(maformats, self.get_argument('MUSICAL_ARTIFACT_TAGS'))
except OSError as e:
logging.error(e)
result['errors'] = "Can't search Musical Artifacts: {}".format(e)

return result

def do_install_file(self):
result = {}

try:
for fpath in self.get_argument('INSTALL_FPATH').split(","):
fpath = fpath.strip()
Expand All @@ -219,19 +207,16 @@ def do_install_file(self):
except Exception as e:
logging.error(e)
result['errors'] = "Can't install file: {}".format(e)

result.update(self.do_get_tree())
return result

def do_install_url(self):
result = {}

try:
self.install_url(self.get_argument('INSTALL_URL'))
except Exception as e:
logging.error(e)
result['errors'] = "Can't install URL: {}".format(e)

result.update(self.do_get_tree())
return result

Expand Down

0 comments on commit 37d9e55

Please sign in to comment.