Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix traceback related to undefined variable #487

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/tito/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ def _read_config(self):
# Load the global config. Later, when we know what tag/package we're
# building, we may also load that and potentially override some global
# settings.
# List of filepaths to config files we'll be loading:
rel_eng_dir = os.path.join(find_git_root(), tito_config_dir())
filename = os.path.join(rel_eng_dir, TITO_PROPS)
if not os.path.exists(filename):
error_out("Unable to locate branch configuration: %s\n"
"Please run 'tito init' or use '--without-init' parameter"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment doesn't feel right :-) but it fixes the bug... so perhaps we don't need to check for the file existence?

% filename)

config = RawConfigParser()
config.read(filename)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filename here was undefined.


Expand Down