mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 20:22:46 +00:00
Remove support for very old spacewalk user config file.
This commit is contained in:
parent
9bae3fb9a8
commit
0588b096ec
1 changed files with 5 additions and 9 deletions
|
@ -172,30 +172,26 @@ class ConfigLoader(object):
|
|||
|
||||
def read_user_config():
|
||||
config = {}
|
||||
file_loc = os.path.expanduser("~/.spacewalk-build-rc")
|
||||
file_loc = os.path.expanduser("~/.titorc")
|
||||
try:
|
||||
f = open(file_loc)
|
||||
except:
|
||||
file_loc = os.path.expanduser("~/.titorc")
|
||||
try:
|
||||
f = open(file_loc)
|
||||
except:
|
||||
# File doesn't exist but that's ok because it's optional.
|
||||
return config
|
||||
# File doesn't exist but that's ok because it's optional.
|
||||
return config
|
||||
|
||||
for line in f.readlines():
|
||||
if line.strip() == "":
|
||||
continue
|
||||
tokens = line.split("=")
|
||||
if len(tokens) != 2:
|
||||
raise Exception("Error parsing ~/.spacewalk-build-rc: %s" % line)
|
||||
raise Exception("Error parsing ~/.titorc: %s" % line)
|
||||
config[tokens[0]] = tokens[1].strip()
|
||||
return config
|
||||
|
||||
|
||||
def lookup_build_dir(user_config):
|
||||
"""
|
||||
Read build_dir in from ~/.spacewalk-build-rc if it exists, otherwise
|
||||
Read build_dir user config if it exists, otherwise
|
||||
return the current working directory.
|
||||
"""
|
||||
build_dir = DEFAULT_BUILD_DIR
|
||||
|
|
Loading…
Add table
Reference in a new issue