diff options
Diffstat (limited to 'buildstream/_profile.py')
-rw-r--r-- | buildstream/_profile.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/buildstream/_profile.py b/buildstream/_profile.py index a484362d4..a18cdfe5f 100644 --- a/buildstream/_profile.py +++ b/buildstream/_profile.py @@ -119,13 +119,14 @@ def profile_end(topic, key): def profile_init(): - if initialized: - return - setting = os.getenv('BST_PROFILE') - if setting: - topics = setting.split(':') - for topic in topics: - active_topics[topic] = True + global initialized + if not initialized: + setting = os.getenv('BST_PROFILE') + if setting: + topics = setting.split(':') + for topic in topics: + active_topics[topic] = True + initialized = True def profile_enabled(topic): |