summaryrefslogtreecommitdiff
path: root/python/vyos/configsource.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-08-12 22:18:13 +0200
committerGitHub <noreply@github.com>2024-08-12 22:18:13 +0200
commitc50c55b93027d9000fa4fd966197402c1422ed3f (patch)
tree00617ce16080a12b13eb8d4f80affbba32dc4ddb /python/vyos/configsource.py
parent33273bcc224e82b42fa3db06e9fe2168abdc6205 (diff)
parent3c556eda35a49d7088d4b5b1ff281854cad94bef (diff)
downloadvyos-1x-c50c55b93027d9000fa4fd966197402c1422ed3f.tar.gz
vyos-1x-c50c55b93027d9000fa4fd966197402c1422ed3f.zip
Merge pull request #3959 from vyos/mergify/bp/circinus/pr-3955
configd: T6640: enforce in_session returns False under configd (backport #3955)
Diffstat (limited to 'python/vyos/configsource.py')
-rw-r--r--python/vyos/configsource.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/vyos/configsource.py b/python/vyos/configsource.py
index f582bdfab..59e5ac8a1 100644
--- a/python/vyos/configsource.py
+++ b/python/vyos/configsource.py
@@ -204,6 +204,8 @@ class ConfigSourceSession(ConfigSource):
Returns:
True if called from a configuration session, False otherwise.
"""
+ if os.getenv('VYOS_CONFIGD', ''):
+ return False
try:
self._run(self._make_command('inSession', ''))
return True