From a9b7d9ccf43ecbc29e6b775eaefb3d1f4cb6e793 Mon Sep 17 00:00:00 2001 From: Joscha Date: Mon, 9 Dec 2019 17:40:47 +0000 Subject: [PATCH] Find user and host before loading the first config file --- evering/config.py | 5 ++++- evering/process.py | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/evering/config.py b/evering/config.py index 23492e8..24ac6c5 100644 --- a/evering/config.py +++ b/evering/config.py @@ -63,7 +63,10 @@ class DefaultConfig: return {name: d.value for name, d in self._values.items() if d.has_constant_value} def to_config(self) -> "Config": - return Config(self.to_local_vars()) + config = Config(self.to_local_vars()) + config.user = get_user() + config.host = get_host() + return config def to_config_file(self) -> str: """ diff --git a/evering/process.py b/evering/process.py index fa6213c..6ae29d7 100644 --- a/evering/process.py +++ b/evering/process.py @@ -126,8 +126,6 @@ class Processor: config_copy = config.copy() config_copy.target = target - config_copy.user = get_user() - config_copy.host = get_host() try: parser = Parser(