From: Alfredo Deza Date: Wed, 24 Sep 2014 21:17:48 +0000 (-0400) Subject: remove the sudo checks in ceph-deploy X-Git-Tag: v1.5.16~7^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e1340631790108147063b39b670218f0d8a36caa;p=ceph-deploy.git remove the sudo checks in ceph-deploy Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/connection.py b/ceph_deploy/connection.py index ec5c931..92371be 100644 --- a/ceph_deploy/connection.py +++ b/ceph_deploy/connection.py @@ -8,8 +8,6 @@ def get_connection(hostname, username, logger, threads=5, use_sudo=None): A very simple helper, meant to return a connection that will know about the need to use sudo. """ - if use_sudo is None: - use_sudo = needs_sudo() if username: hostname = "%s@%s" % (username, hostname) try: @@ -44,9 +42,3 @@ def get_local_connection(logger, use_sudo=False): threads=1, use_sudo=use_sudo ) - - -def needs_sudo(): - if getpass.getuser() == 'root': - return False - return True