Hi All, Please review this patch.
Thanks, Abhijeet Kasurde
From 3fb79f9a2b39dc6e9da67b0234ee7a4de6a39518 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde <akasu...@redhat.com> Date: Sat, 7 May 2016 11:33:21 +0530 Subject: [PATCH] Removed custom implementation of CalledProcessError Removed custom class of CalledProcessError which was required for Python versions prior to 2.5 Fixes: https://fedorahosted.org/freeipa/ticket/5717 Signed-off-by: Abhijeet Kasurde <akasu...@redhat.com> --- ipapython/ipautil.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py index 4597f1c63e21169d4dbbfb2c919b1ee2cb6a35e7..d4c8e8b82ac22d8903f77f1acc8edc8c0e98e458 100644 --- a/ipapython/ipautil.py +++ b/ipapython/ipautil.py @@ -1,6 +1,6 @@ # Authors: Simo Sorce <sso...@redhat.com> # -# Copyright (C) 2007-2011 Red Hat +# Copyright (C) 2007-2016 Red Hat, Inc. # see file 'COPYING' for use and warranty information # # This program is free software; you can redistribute it and/or modify @@ -40,6 +40,7 @@ import grp from contextlib import contextmanager import locale import collections +from subprocess import CalledProcessError from dns import resolver, reversename from dns.exception import DNSException @@ -64,20 +65,6 @@ KRB5_KDC_UNREACH = 2529639068 # Cannot contact any KDC for requested realm KRB5KDC_ERR_SVC_UNAVAILABLE = 2529638941 # A service is not available that is # required to process the request -try: - from subprocess import CalledProcessError -except ImportError: - # Python 2.4 doesn't implement CalledProcessError - class CalledProcessError(Exception): - """This exception is raised when a process run by check_call() returns - a non-zero exit status. The exit status will be stored in the - returncode attribute.""" - def __init__(self, returncode, cmd, output=None): - self.returncode = returncode - self.cmd = cmd - self.output = output - def __str__(self): - return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode) def get_domain_name(): try: -- 2.4.11
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code