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/a1a1942a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a1a1942a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a1a1942a Branch: refs/heads/branch-2.1 Commit: a1a1942a18e3877dee2ba40de361aa93e2935aef Parents: a67b1e1 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Nov 3 17:13:20 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Nov 3 17:13:20 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/a1a1942a/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):