-
Notifications
You must be signed in to change notification settings - Fork 129
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
Conversation
Reverts part of 68d8b21
error_out("Unable to locate branch configuration: %s\n" | ||
"Please run 'tito init' or use '--without-init' parameter" | ||
% filename) | ||
|
||
config = RawConfigParser() | ||
config.read(filename) |
There was a problem hiding this comment.
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.
Fixes #486 |
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" |
There was a problem hiding this comment.
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?
I'd propose a different fix. Maybe I am missing something though. Do you think this will work? diff --git a/src/tito/cli.py b/src/tito/cli.py
index 762f49b..3d3a520 100644
--- a/src/tito/cli.py
+++ b/src/tito/cli.py
@@ -98,7 +98,7 @@ def _read_config(self):
# building, we may also load that and potentially override some global
# settings.
config = RawConfigParser()
- config.read(filename)
+ config.read(self.tito_props_path)
self._check_legacy_globalconfig(config)
return config |
Fixup after 68d8b21 Obsoletes PR rpm-software-management#487
I think we can close this in favor of PR #489 |
Agreed. |
Reverts part of 68d8b21