Repository: ambari Updated Branches: refs/heads/branch-2.1 a67b1e12d -> a1a1942a1 refs/heads/trunk ca7b82983 -> d501a38a1
AMBARI-13697. local variable 'out' referenced before assignment (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d501a38a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d501a38a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d501a38a Branch: refs/heads/trunk Commit: d501a38a144a037f282e53861deb942ea649d88e Parents: ca7b829 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Nov 3 17:13:15 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Nov 3 17:13:15 2015 +0200 ---------------------------------------------------------------------- .../main/python/resource_management/core/providers/service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d501a38a/ambari-common/src/main/python/resource_management/core/providers/service.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/resource_management/core/providers/service.py b/ambari-common/src/main/python/resource_management/core/providers/service.py index 50167f1..66f8076 100644 --- a/ambari-common/src/main/python/resource_management/core/providers/service.py +++ b/ambari-common/src/main/python/resource_management/core/providers/service.py @@ -67,7 +67,7 @@ class ServiceProvider(Provider): else: ret,out = shell.call(custom_cmd) else: - ret = self._init_cmd(command) + ret,out = self._init_cmd(command) if expect is not None and expect != ret: raise Fail("%r command %s for service %s failed with return code: %d. %s" % ( @@ -84,7 +84,7 @@ class ServiceProvider(Provider): ret,out = shell.call(["/sbin/" + command, self.resource.service_name]) else: ret,out = shell.call(["/etc/init.d/%s" % self.resource.service_name, command]) - return ret + return ret,out @property def _upstart(self):