Jeremy Rosengren wrote:
This patch should fix the traceback that occurs when you run a command with -h (cobbler reposync -h). Looking back through the history of cobbler.py, it looked like a simple matter of the conditional expressions becoming reversed in a recent commit.
cobbler reposync -h works for me as is, from latest git, and in the released version.
What version of Cobbler are you using (rpm -q cobbler)? The code in question below is already correct, because it prints the traceback only for non-cobbler ("CX") exceptions.
--Michael
Thanks, -- jeremy --- cobbler/cobbler.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cobbler/cobbler.py b/cobbler/cobbler.py index fb9b273..0f201f7 100755 --- a/cobbler/cobbler.py +++ b/cobbler/cobbler.py @@ -56,9 +56,9 @@ def main(): print str(exc)[1:-1] # remove framing air quotes except Exception, exc2: if str(type(exc2)).find("CX") == -1: - traceback.print_exc() - else: print str(exc2)[1:-1] # remove framing air quotes + else: + traceback.print_exc() return 1 return 1 -- 1.5.2.1 _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/et-mgmt-tools
_______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/et-mgmt-tools