Skip to content

Commit

Permalink
Fix network bug
Browse files Browse the repository at this point in the history
  • Loading branch information
a645162 committed Jun 24, 2024
1 parent 2e045fd commit 4ff8751
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@ pip install li-group-center -i https://pypi.python.org/simple
```

```bash
pip install li-group-center==1.2.0 -i https://pypi.python.org/simple
pip install li-group-center==1.2.1 -i https://pypi.python.org/simple
```

## Upgrade

```bash
pip install --upgrade li-group-center -i https://pypi.python.org/simple
```

## Feature

### Machine User Message

```python
from group_center.feature.nvi_notify.machine_user_message \
import machine_user_message_via_local_nvi_notify as push_message

push_message("konghaomin", "Test Message~")
```
2 changes: 1 addition & 1 deletion config/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from config import global_config

__version__ = "1.2.0"
__version__ = "1.2.1"


def get_version_path() -> str:
Expand Down
12 changes: 8 additions & 4 deletions group_center/feature/nvi_notify/machine_user_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ def machine_user_message_via_local_nvi_notify(
"content": content,
}

notify_api.send_to_nvi_notify(
dict_data=data_dict,
target="/machine_user_message"
)
try:
notify_api.send_to_nvi_notify(
dict_data=data_dict,
target="/machine_user_message"
)
except Exception:
# Ignore all errors to avoid program crash.
pass

0 comments on commit 4ff8751

Please sign in to comment.