Skip to content

Commit 9343592

Browse files
committed
Fix for Ubuntu python-pywebview bug; add SIGUSR1 documentation.
See #242.
1 parent c7094a5 commit 9343592

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ This option overrides the proxy's default behaviour, which varies by platform (s
115115

116116
- `--debug` enables debug mode, printing more verbose output to the log as [discussed below](#troubleshooting).
117117
This argument is identical to enabling debug mode from the proxy's menu bar icon.
118+
If needed, debug mode can also be toggled at runtime by sending the signal `SIGUSR1` (e.g.: `pkill -SIGUSR1 -f emailproxy`).
118119

119120
### Advanced configuration<a id="advanced-configuration"></a>
120121
The [example configuration file](https://github.com/simonrob/email-oauth2-proxy/blob/main/emailproxy.config) contains further documentation for various additional features of the proxy, including catch-all (wildcard) accounts, locally-encrypted connections and advanced Office 365 OAuth 2.0 flows.

emailproxy.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
__author__ = 'Simon Robinson'
77
__copyright__ = 'Copyright (c) 2024 Simon Robinson'
88
__license__ = 'Apache 2.0'
9-
__version__ = '2024-05-22' # ISO 8601 (YYYY-MM-DD)
9+
__version__ = '2024-05-23' # ISO 8601 (YYYY-MM-DD)
1010
__package_version__ = '.'.join([str(int(i)) for i in __version__.split('-')]) # for pyproject.toml usage only
1111

1212
import abc
@@ -2836,8 +2836,10 @@ def create_authorisation_window(self, request):
28362836

28372837
# pywebview 3.6+ moved window events to a separate namespace in a non-backwards-compatible way
28382838
# noinspection PyDeprecation
2839-
if pkg_resources.parse_version(
2840-
pkg_resources.get_distribution('pywebview').version) < pkg_resources.parse_version('3.6'):
2839+
pywebview_version = pkg_resources.parse_version(pkg_resources.get_distribution('pywebview').version)
2840+
# the version zero check is due to a bug in the Ubuntu 22.04 python-pywebview package - see GitHub #242
2841+
# noinspection PyDeprecation
2842+
if pkg_resources.parse_version('0') < pywebview_version < pkg_resources.parse_version('3.6'):
28412843
# noinspection PyUnresolvedReferences
28422844
authorisation_window.loaded += self.authorisation_window_loaded
28432845
else:

0 commit comments

Comments
 (0)