Skip to content

Commit 678544b

Browse files
committed
fix logging imports
1 parent 3bdcd92 commit 678544b

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Changelog
33
=========
44

5+
v1.0.2
6+
------
7+
- fix bug in logging imports
8+
59
v1.0.1
610
------
711
- more robust pump initialization

py_hplc/pump_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from __future__ import annotations
88

9-
import logging
9+
from logging import Logger, getLogger
1010
from time import sleep
1111
from typing import TYPE_CHECKING, Union
1212

@@ -41,9 +41,9 @@ def __init__(self, device: Union[SerialBase, str], logger: Logger = None) -> Non
4141

4242
# you'll have to reach in and add handlers yourself from the calling code
4343
if logger is None: # append to the root logger
44-
self.logger = logging.getLogger(f"{logging.getLogger().name}.{device}")
44+
self.logger = getLogger(f"{getLogger().name}.{device}")
4545
elif isinstance(logger, Logger): # append to the passed logger
46-
self.logger = logging.getLogger(f"{logger.name}.{device}")
46+
self.logger = getLogger(f"{logger.name}.{device}")
4747

4848
# persistent identifying attributes
4949
self.max_flowrate: float = None

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "py-hplc"
3-
version = "1.0.1"
3+
version = "1.0.2"
44
description = "An unoffical Python wrapper for the SSI-Teledyne Next Generation class HPLC pumps."
55
license = "MIT"
66
repository = "https://github.com/teauxfu/py-hplc"

0 commit comments

Comments
 (0)