GUI development

This commit is contained in:
BarsTiger
2022-01-27 13:46:26 +02:00
parent afbd4c995f
commit 4b55081693
6 changed files with 162 additions and 22 deletions

View File

@@ -11,18 +11,20 @@ def get_source(package):
r = json.loads(r)
except:
print("[red]Error with unsupported message[/]")
return
return "Error with unsupported message"
try:
if r["message"] == "not found":
print("[red]Package not found[/]")
return
return "Package not found"
if r["message"] == "Internal server error":
print("[red]Internal server error[/]")
return
return "Internal server error"
except:
pass
try:
webbrowser.open(r["sourceUrl"])
return None
except:
print("[red]No source code available for this app[/]")
return "No source code available for this app"