From f7f9132931414ddccc69dfd4456edbba6b8148f4 Mon Sep 17 00:00:00 2001 From: Alexander Bus <busfromrus@gmail.com> Date: Mon, 11 Feb 2019 23:00:46 +0700 Subject: [PATCH] Fix #9 --- README.md | 2 +- README.rst | 8 ++++---- cutelog/listener.py | 2 ++ cutelog/main_window.py | 2 -- setup.py | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 140422d..789afea 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Light theme | Dark theme <img src="https://raw.githubusercontent.com/busimus/cutelog/master/screenshots/main_light.png" width="240"> | <img src="https://raw.githubusercontent.com/busimus/cutelog/master/screenshots/main_dark.png" width="240"> ## Installation -**If you're using Linux**, install PyQt5 from your package manager before installing cutelog (package name is probably ``python3-pyqt5`` or ``python-pyqt5``). Or just run ``pip install pyqt5`` to install it from pip, which is sub-optimal. +**If you're using Linux**, install PyQt5 (or PySide2) from your package manager before installing cutelog (package name is probably ``python3-pyqt5`` or ``python-pyqt5``). Or just run ``pip install pyqt5`` to install it from pip, which is sub-optimal. ``` $ pip install cutelog diff --git a/README.rst b/README.rst index 9fa04b8..516b01c 100644 --- a/README.rst +++ b/README.rst @@ -14,17 +14,17 @@ cutelog is cross-platform, although it's mainly written and optimized for Linux. Features ======== * Allows any number of simultaneous connections -* Fully customizable look of log levels and columns -* Filtering based on level and name of the logger, as well as filtering by searching +* Customizable look of log levels and columns, with presets for each +* Filtering based on level and namespace, as well as filtering by searching * Search through all records or only through filtered ones * View exception tracebacks or messages in a separate window * Dark theme (with its own set of colors for levels) * Pop tabs out of the window, merge records of multiple tabs into one - +* Save/load records to/from a file in JSON format Installation ============ -**If you're using Linux**, install PyQt5 from your package manager before installing cutelog (package name is probably ``python3-pyqt5`` or ``python-pyqt5``). Or just run ``pip install pyqt5`` to install it from pip, which is sub-optimal. +**If you're using Linux**, install PyQt5 (or PySide2) from your package manager before installing cutelog (package name is probably ``python3-pyqt5`` or ``python-pyqt5``). Or just run ``pip install pyqt5`` to install it from pip, which is sub-optimal. :: $ pip install --upgrade cutelog diff --git a/cutelog/listener.py b/cutelog/listener.py index f05fafd..db2bb4c 100644 --- a/cutelog/listener.py +++ b/cutelog/listener.py @@ -152,6 +152,8 @@ class LogConnection(QThread): if not read_len: break read_len = struct.unpack(">L", read_len)[0] + if read_len == 0: + continue data = wait_and_read(read_len) if not data: diff --git a/cutelog/main_window.py b/cutelog/main_window.py index 4383588..f8b7ed6 100644 --- a/cutelog/main_window.py +++ b/cutelog/main_window.py @@ -31,8 +31,6 @@ class MainWindow(QMainWindow): self.setupUi() self.start_server() - # self.load_records('/home/bus/4krecords.log') - # self.load_records('/home/bus/busocket_records.log') def setupUi(self): self.resize(800, 600) diff --git a/setup.py b/setup.py index 5c46697..fe5cd83 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup from setuptools.command.install import install -VERSION = '2.0.0' +VERSION = '2.0.1' def build_qt_resources(): @@ -49,8 +49,10 @@ setup( author_email="busfromrus@gmail.com", url="https://github.com/busimus/cutelog/", - requires=['PyQt5', 'QtPy'], python_requires=">=3.5", + install_requires=['PyQt5;platform_system=="Darwin"', # it's better to use distro-supplied + 'PyQt5;platform_system=="Windows"', # PyQt package on Linux + 'QtPy'], classifiers=[ "Development Status :: 4 - Beta", @@ -71,8 +73,6 @@ setup( download_url="https://github.com/Busimus/cutelog/archive/{}.zip".format(VERSION), entry_points={'console_scripts': 'cutelog=cutelog.__main__:main'}, include_package_data=True, - install_requires=['PyQt5;platform_system=="Darwin"', # it's better to use distro-supplied - 'PyQt5;platform_system=="Windows"'], # PyQt package on Linux keywords=["log", "logging", "gui", "qt"], license="GPLv3", long_description=open(join(dirname(__file__), "README.rst")).read(), -- GitLab