Skip to content

Commit

Permalink
Document set/get vars in python api
Browse files Browse the repository at this point in the history
  • Loading branch information
inknos authored and j-mracek committed Mar 8, 2023
1 parent 6c9bc08 commit b9bafe4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/python3/libdnf5/tutorial/session/create_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
# configuration from a different location.
base.load_config_from_file()

# Optionally you can set and get vars
# vars = base.get_vars().get()
# vars.set('releasever', '33')
#
# Its value can be printed by get_value method
# print(vars.get_value('releasever'))
#
# There are plans in the future to support the methods get() or get_priority()

# Optionally set installroot.
#
# Installroot is set to '/' when we're working with the system, but we can set
Expand All @@ -23,4 +32,3 @@
# configuration. Locks the installroot and varsdir configuration values so
# that they can't be changed.
base.setup()

0 comments on commit b9bafe4

Please sign in to comment.