You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2014/07/07 18:15:11 UTC
git commit: AMBARI-6368. deprecated messge printed during
ambari-server setup (aonishuk)
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 <ao...@hortonworks.com>
Authored: Mon Jul 7 19:15:04 2014 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
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)