added fixes for T191
added testcase to test_yumrepoinfo_directive.py
Details
Run 'py.test /testing' on x86_64 and i386 machines
Diff Detail
- Repository
- rLTRN libtaskotron
- Lint
Lint Skipped - Unit
Unit Tests Skipped
I think it's fine, just a few cleanups and improvements are possible (only the one on line 56 seems a bit important to me).
| libtaskotron/directives/yumrepoinfo_directive.py | ||
|---|---|---|
| 25 | TaskotronValueError doesn't need to be imported, it's not used. Not related to this patch, but can be removed while we're at it. | |
| 46–47 | It seems that self.conf is also not used anywhere, can be removed. | |
| 55 | I wonder if 'noarch' is a good fallback here. It will definitely make the URLs invalid (we don't have 'noarch' trees in our YUM repos). And since I see a check that arch is in input_data just a few lines above, I think the default should be removed. In some unexpected condition, it would raise an error, which is better. Let's make it arch = input_data['arch'] | |
| 60 | Just a nitpick, is is a better comparison here. But I'm not actually sure whether it's faster or something, it's just cleaner and more 'posh and proper' I think :-) | |
TaskotronValueError doesn't need to be imported, it's not used. Not related to this patch, but can be removed while we're at it.