Skip to content

Commit

Permalink
Add environment information to leappdb
Browse files Browse the repository at this point in the history
Related to changes extending the information stored in the leapp db.
After this comment, the command line arguments as well as the
environment variables modifying the leapp execution (env vars starting
with `LEAPP_`) will be stored in the database.

Works on: OAMG-8402
  • Loading branch information
dkubek authored and pirat89 committed May 22, 2024
1 parent a789309 commit ae387bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions commands/upgrade/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
import os
import shutil
import sys
import tarfile
from datetime import datetime

Expand Down Expand Up @@ -235,6 +236,8 @@ def prepare_configuration(args):
'debug': os.getenv('LEAPP_DEBUG', '0'),
'verbose': os.getenv('LEAPP_VERBOSE', '0'),
'whitelist_experimental': args.whitelist_experimental or (),
'environment': {env: os.getenv(env) for env in os.environ if env.startswith('LEAPP_')},
'cmd': sys.argv,
}
return configuration

Expand Down

0 comments on commit ae387bc

Please sign in to comment.