Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 35A9511FD0 for ; Mon, 7 Jul 2014 16:15:12 +0000 (UTC) Received: (qmail 59511 invoked by uid 500); 7 Jul 2014 16:15:12 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 59481 invoked by uid 500); 7 Jul 2014 16:15:12 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 59472 invoked by uid 99); 7 Jul 2014 16:15:12 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jul 2014 16:15:12 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id CA0D79A7AC9; Mon, 7 Jul 2014 16:15:11 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aonishuk@apache.org To: commits@ambari.apache.org Message-Id: <5c8d0c434dd643fca290fb64e96046c7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-6368. deprecated messge printed during ambari-server setup (aonishuk) Date: Mon, 7 Jul 2014 16:15:11 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk 19392c5a4 -> 54ef1b5a3 AMBARI-6368. deprecated messge printed during ambari-server setup (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/54ef1b5a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/54ef1b5a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/54ef1b5a Branch: refs/heads/trunk Commit: 54ef1b5a324eb17798b74ed46aed026fd8879811 Parents: 19392c5 Author: Andrew Onishuk Authored: Mon Jul 7 19:15:04 2014 +0300 Committer: Andrew Onishuk Committed: Mon Jul 7 19:15:04 2014 +0300 ---------------------------------------------------------------------- ambari-server/src/main/python/ambari-server.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/54ef1b5a/ambari-server/src/main/python/ambari-server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index a53c648..1aaff95 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -641,10 +641,6 @@ class FatalException(Exception): def __str__(self): return repr("Fatal exception: %s, exit code %s" % (self.reason, self.code)) - def _get_message(self): - return str(self) - - class NonFatalException(Exception): def __init__(self, reason): self.reason = reason @@ -652,9 +648,6 @@ class NonFatalException(Exception): def __str__(self): return repr("NonFatal exception: %s" % self.reason) - def _get_message(self): - return str(self) - def is_root(): ''' @@ -860,7 +853,7 @@ def check_ambari_user(): print_error_msg("Failed: %s" % e.strerror) return 4 except Exception as e: - print_error_msg("Unexpected error %s" % e.message) + print_error_msg("Unexpected error %s" % e) return 1 return 0 @@ -1715,7 +1708,7 @@ def install_jce_manualy(args): shutil.copy(args.jce_policy, jce_destination) except Exception, e: err = "Can not copy file {0} to {1} due to: {2}. Please check file " \ - "permissions and free disk space.".format(args.jce_policy, jce_destination, e.message) + "permissions and free disk space.".format(args.jce_policy, jce_destination, e) raise FatalException(-1, err) print "JCE policy copied from " + args.jce_policy + " to " + jce_destination return 0 @@ -1848,7 +1841,7 @@ def download_jdk(args): jdk_version = re.search(JDK_VERSION_REs[JDK_INDEX], out).group(1) write_property(JDK_NAME_PROPERTY, JDK_FILENAME) except Exception, e: - print "Installation of JDK has failed: %s\n" % e.message + print "Installation of JDK has failed: %s\n" % e file_exists = os.path.isfile(dest_file) if file_exists: ok = get_YN_input("JDK found at "+dest_file+". " @@ -1865,7 +1858,7 @@ def download_jdk(args): jdk_version = re.search(JDK_VERSION_REs[JDK_INDEX], out).group(1) write_property(JDK_NAME_PROPERTY, JDK_FILENAME) except Exception, e: - print "Installation of JDK was failed: %s\n" % e.message + print "Installation of JDK was failed: %s\n" % e err = "Unable to install JDK. Please remove JDK, file found at " + \ dest_file + " and re-run Ambari Server setup" raise FatalException(1, err) @@ -2090,7 +2083,7 @@ def copy_file(src, dest_file): shutil.copyfile(src, dest_file) except Exception, e: err = "Can not copy file {0} to {1} due to: {2} . Please check file " \ - "permissions and free disk space.".format(src, dest_file, e.message) + "permissions and free disk space.".format(src, dest_file, e) raise FatalException(1, err) @@ -2329,7 +2322,7 @@ def proceedJDBCProperties(args): shutil.copy(args.jdbc_driver, resources_dir) except Exception, e: err = "Can not copy file {0} to {1} due to: {2} . Please check file " \ - "permissions and free disk space.".format(args.jdbc_driver, resources_dir, e.message) + "permissions and free disk space.".format(args.jdbc_driver, resources_dir, e) raise FatalException(1, err) os.symlink(os.path.join(resources_dir,jdbc_name), jdbc_symlink)