diff options
author | mathieui <mathieui@mathieui.net> | 2021-04-11 18:55:26 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-04-11 18:57:23 +0200 |
commit | 0541bbb4bcd3144afa682d8041f1235274a1468d (patch) | |
tree | bdbc669ccda186a7fc109569dc6352f4ec7f361d /poezio/core/core.py | |
parent | 1640a90a632ebe74a06602adc60fa8f1508fd7e5 (diff) | |
download | poezio-0541bbb4bcd3144afa682d8041f1235274a1468d.tar.gz poezio-0541bbb4bcd3144afa682d8041f1235274a1468d.tar.bz2 poezio-0541bbb4bcd3144afa682d8041f1235274a1468d.tar.xz poezio-0541bbb4bcd3144afa682d8041f1235274a1468d.zip |
internal: remove more global state from config
Diffstat (limited to 'poezio/core/core.py')
-rw-r--r-- | poezio/core/core.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/poezio/core/core.py b/poezio/core/core.py index 66af7a28..345a3f9a 100644 --- a/poezio/core/core.py +++ b/poezio/core/core.py @@ -46,7 +46,7 @@ from poezio.bookmarks import ( Bookmark, ) from poezio.common import get_error_message -from poezio.config import config, firstrun +from poezio.config import config from poezio.contact import Contact, Resource from poezio.daemon import Executor from poezio.fifo import Fifo @@ -87,11 +87,13 @@ class Core: """ custom_version: str + firstrun: bool - def __init__(self, custom_version: str): + def __init__(self, custom_version: str, firstrun: bool): self.completion = CompletionCore(self) self.command = CommandCore(self) self.handler = HandlerCore(self) + self.firstrun = firstrun # All uncaught exception are given to this callback, instead # of being displayed on the screen and exiting the program. sys.excepthook = self.on_exception @@ -545,7 +547,7 @@ class Core: ' colors will probably be ugly', 'Error', ) - if firstrun: + if self.firstrun: self.information( 'It seems that it is the first time you start poezio.\n' 'The online help is here https://doc.poez.io/\n\n' |