Skip to content

Commit edf9f36

Browse files
committed
minor fixes and prepare for release of v2.1.0
Signed-off-by: Romain Bezut <morian@xdec.net>
1 parent a2e56a2 commit edf9f36

File tree

5 files changed

+7
-17
lines changed

5 files changed

+7
-17
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Blacknet changelog
22

3-
## [2.1.0] - UNRELEASED
3+
## [2.1.0] - 2023-09-19
44
- SQL: add a default value for notes on attackers
55
- Drop compability with Python2, ensure compatibility up to Python3.11
66
- Upgrade the build system to use `pyproject.toml` with setuptools
@@ -23,7 +23,7 @@
2323
- Fix log verbosity on failed connections
2424
- Add systemd example service scripts
2525
- Fix updater script for python3
26-
- Harden scrubber for `corrupted` databases
26+
- Harden scrubber for "corrupted" databases
2727

2828
## [2.0.6] - 2017-06-07
2929
- Work around hung threads

blacknet/sensor.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from .common import (
1515
BLACKNET_LOG_DEBUG,
1616
BLACKNET_LOG_DEFAULT,
17-
BLACKNET_LOG_ERROR,
1817
BLACKNET_LOG_INFO,
1918
BLACKNET_PING_INTERVAL,
2019
BLACKNET_SSH_AUTH_RETRIES,
@@ -236,10 +235,6 @@ def log(self, message: str, level: int = BLACKNET_LOG_DEFAULT) -> None:
236235
peername = "%s" % (self.__peer_ip)
237236
self.__bns._logger.write(f"{peername}: {message}", level)
238237

239-
def log_error(self, message: str) -> None:
240-
"""Write an error message to the logger."""
241-
self.log(message, BLACKNET_LOG_ERROR)
242-
243238
def log_info(self, message: str) -> None:
244239
"""Write an informational message to the logger."""
245240
self.log(message, BLACKNET_LOG_INFO)

blacknet/server.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
from .common import (
1313
BLACKNET_LOG_CRITICAL,
14-
BLACKNET_LOG_DEBUG,
1514
BLACKNET_LOG_DEFAULT,
1615
BLACKNET_LOG_ERROR,
1716
BLACKNET_LOG_INFO,
@@ -123,7 +122,7 @@ def log(self, message: str, level: int = BLACKNET_LOG_DEFAULT) -> None:
123122
self._logger.write(message, level)
124123

125124
def log_critical(self, message: str) -> None:
126-
"""Write a critical message to the logger."""
125+
"""Write a critical error message to the logger."""
127126
self.log(message, BLACKNET_LOG_CRITICAL)
128127

129128
def log_error(self, message: str) -> None:
@@ -134,10 +133,6 @@ def log_info(self, message: str) -> None:
134133
"""Write an informational message to the logger."""
135134
self.log(message, BLACKNET_LOG_INFO)
136135

137-
def log_debug(self, message: str) -> None:
138-
"""Write a debug message to the logger."""
139-
self.log(message, BLACKNET_LOG_DEBUG)
140-
141136
def reload(self) -> None:
142137
"""Reload instance configuration."""
143138
self.log_info("reloading configuration")

blacknet/updater.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __init__(self, cfg_file: Optional[str] = None):
4141

4242
def __del__(self) -> None:
4343
"""Remove temporary directories upon deletion."""
44-
if not self.test_mode:
44+
if not self.test_mode: # pragma: no cover
4545
dirname = self.__dirname
4646
else:
4747
# That's the ZipDir (extracted)
@@ -57,7 +57,7 @@ def test_mode(self) -> bool:
5757
if self.__test_mode is None:
5858
if self.has_config("test_mode"):
5959
self.__test_mode = bool(self.get_config("test_mode"))
60-
else:
60+
else: # pragma: no cover
6161
self.__test_mode = False
6262
return self.__test_mode
6363

@@ -162,7 +162,7 @@ def update(self) -> None:
162162
self.csv_to_database()
163163

164164
self.log("[+] Update Complete")
165-
if not self.test_mode:
165+
if not self.test_mode: # pragma: no cover
166166
self.log(
167167
'[!] We *STRONGLY* suggest running '
168168
'"blacknet-scrubber --full-check --fix" to update gelocation positions.'

tests/requirements-linting.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
black==23.9.1
22
isort==5.12.0
33
mypy==1.5.1
4-
ruff==0.0.288
4+
ruff==0.0.290
55
types-paramiko==3.3.0.0
66
types-PyMySQL==1.1.0.1

0 commit comments

Comments
 (0)