Skip to content

Commit

Permalink
feat: Exiting when app does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Aradhya-Tripathi committed Mar 26, 2022
1 parent 2f17da1 commit fc0be25
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bench/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ class Healthcare(AppConfig):
self.setup_details()

def setup_details(self):
if not urlparse(self.name).netloc and not os.path.exists(
os.path.realpath(self.name)
):
click.secho(f"{self.name} does not exist!", fg="yellow")
return
# fetch meta from installed apps
if (
not self.to_clone
Expand Down Expand Up @@ -220,11 +225,9 @@ def _get_dependencies(self):
if self.on_disk:
required_deps = os.path.join(self.mount_path, self.repo,'hooks.py')
try:
print(required_apps_from_hooks(required_deps, local=True))
return required_apps_from_hooks(required_deps, local=True)
except IndexError:
print(f"No dependencies for {self.repo}")
finally:
return
return []
try:
required_deps = get_required_deps(self.org, self.repo, self.tag or self.branch)
return required_apps_from_hooks(required_deps)
Expand Down

0 comments on commit fc0be25

Please sign in to comment.