Skip to content

Commit 1bf68f2

Browse files
committed
Fix readme typo; better restart handling on import
1 parent 3a96ab1 commit 1bf68f2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Begin by downloading the proxy via one of the following methods:
3131
<li>Clone or <a href="https://github.com/simonrob/email-oauth2-proxy/archive/refs/heads/main.zip">download</a> (and star :-) the <a href="https://github.com/simonrob/email-oauth2-proxy/">GitHub repository</a>, then: <code>python -m pip install -r requirements-core.txt -r requirements-gui.txt</code> to install requirements, and <code>python emailproxy.py</code> to run</li>
3232
</ol>
3333

34-
If you choose download option (A) or (B), you should also [download the sample `emailproxy.config` file](https://github.com/simonrob/email-oauth2-proxy/raw/main/emailproxy.config) and place this into the directory you will run the proxy from.
34+
If you choose download option (B), you should also [download the sample `emailproxy.config` file](https://github.com/simonrob/email-oauth2-proxy/raw/main/emailproxy.config) and place this into the directory you will run the proxy from.
3535
Next, edit the `emailproxy.config` file to add configuration details for each email server and account that you want to use with the proxy.
3636
[Guidance and example account configurations](https://github.com/simonrob/email-oauth2-proxy/blob/main/emailproxy.config) are provided for Office 365, Gmail and several other providers, though you will need to insert your own client credentials for each one (see the [documentation below](https://github.com/simonrob/email-oauth2-proxy/#oauth-20-client-credentials)).
3737
You can remove details from the sample configuration file for services you don't use, or add additional ones for any other OAuth 2.0-authenticated IMAP/POP/SMTP servers you would like to use with the proxy.

emailproxy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
__author__ = 'Simon Robinson'
77
__copyright__ = 'Copyright (c) 2023 Simon Robinson'
88
__license__ = 'Apache 2.0'
9-
__version__ = '2023-11-01' # ISO 8601 (YYYY-MM-DD)
9+
__version__ = '2023-11-02' # 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
@@ -2262,7 +2262,9 @@ class App:
22622262
"""Manage the menu bar icon, server loading, authorisation and notifications, and start the main proxy thread"""
22632263

22642264
def __init__(self, args=None):
2265-
global CONFIG_FILE_PATH, CACHE_STORE
2265+
global CONFIG_FILE_PATH, CACHE_STORE, EXITING
2266+
EXITING = False # needed to allow restarting when imported from parent scripts (or an interpreter)
2267+
22662268
parser = argparse.ArgumentParser(description='%s: transparently add OAuth 2.0 support to IMAP/POP/SMTP client '
22672269
'applications, scripts or any other email use-cases that don\'t '
22682270
'support this authentication method.' % APP_NAME, add_help=False,
@@ -3150,8 +3152,6 @@ def exit(self, icon, restart_callback=None):
31503152
if sys.platform == 'darwin' and self.args.gui and self.macos_unload_plist_on_exit:
31513153
self.macos_launchctl('unload')
31523154

3153-
EXITING = False # to allow restarting when imported from parent scripts (or an interpreter)
3154-
31553155

31563156
if __name__ == '__main__':
31573157
App()

0 commit comments

Comments
 (0)