]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
remove the sudo checks in ceph-deploy
authorAlfredo Deza <alfredo.deza@inktank.com>
Wed, 24 Sep 2014 21:17:48 +0000 (17:17 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Wed, 24 Sep 2014 21:17:48 +0000 (17:17 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/connection.py

index ec5c931ab06d4d28ca1a8a7c7430e2ddd38bd49e..92371be51b87a105236eb27b03b2d8a44c4ee5a0 100644 (file)
@@ -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