Skip to content

Commit

Permalink
added linux executable
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikoh77 committed May 20, 2024
1 parent 8d72b82 commit 2669fa4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ config.ini

.vscode/
.persistence
shinogramma.build/
shinogramma.dist/
shinogramma.onefile-build/
bin/shinogramma.build/
bin/shinogramma.dist/
bin/shinogramma.onefile-build/
nuitka_compile_command.txt
shinogramma.log
Binary file modified bin/shinogramma.bin
Binary file not shown.
12 changes: 5 additions & 7 deletions src/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,12 @@ async def notifier(self) -> Response:
url = f"{self.baseUrl}:{self.shinobiPort}/{self.shinobiApiKey}/monitor/{self.groupKey}/{mid}"
data = await queryUrl(url=url)
if not data:
logger.error(
logger.warning(
msg=f"Error querying/getting data from {url} about monitor {mid}..."
)
abort(
code=204
)
dataInJson = data.json()
name = dataInJson[0].get("name")
else:
dataInJson = data.json()
name = dataInJson[0].get("name")
except json.JSONDecodeError:
logger.error(
msg=f"{message}\n is not a valid JSON object, returning 400 error code..."
Expand All @@ -97,7 +95,7 @@ async def notifier(self) -> Response:
"<b>WARNING:</b>\n"
+ (f"Title: <b>{title}</b>\n" if 'title' in locals() else "")
+ (f"Description: <b>{description}</b>\n" if 'description' in locals() else "")
+ (f"Reason: <b>{reason}</b>\n" if 'reason' in locals() else "")
+ (f"Reason: <b>{reason}</b>\n" if 'reason' in locals() else "") # TODO add emoticons
+ (f"Name: <b>{name}</b>\n" if 'name' in locals() else "")
+ (f"Confidence: <b>{confidence}</b>\n" if 'confidence' in locals() else "")
)
Expand Down

0 comments on commit 2669fa4

Please sign in to comment.