Archived
Minor fixes
This commit is contained in:
1 parent
4f0f30b2f5
commit
5704e4c57f
2 files changed
+6
-2
No files matched your search
@@ -47,7 +47,7 @@ class Command(BaseCommand):
|
||||
inside_users = inside_users.exclude(
|
||||
Q(ldap_username__isnull=True)
|
||||
| Q(registration_status='partial')
|
||||
| Q(ldap_password__isnull=True)).values_list('username', flat=True)
|
||||
| Q(ldap_password__isnull=True)).values_list('ldap_username', flat=True)
|
||||
|
||||
if self.options['verbosity'] == '3':
|
||||
self.stdout.write('Found {} Inside users'.format(len(inside_users)))
|
||||
|
||||
@@ -45,9 +45,13 @@ def get_home_dirs():
|
||||
host_string = '{}@{}'.format(settings.FILESERVER_SSH_USER, settings.FILESERVER_HOST)
|
||||
fabric_settings = _get_fabric_settings(host_string)
|
||||
|
||||
separator = '\r\n{}'.format(settings.FILESERVER_HOME_PATH)
|
||||
if settings.FILESERVER_HOME_PATH[-1] != '/':
|
||||
separator = '{}/'.format(separator)
|
||||
|
||||
with fab_settings(**fabric_settings):
|
||||
with hide('running', 'stdout', 'stderr'):
|
||||
homedirs_str = run('find {} -maxdepth 1 -type d'.format(settings.FILESERVER_HOME_PATH))
|
||||
homedirs = homedirs_str.split('\r\n{}'.format(settings.FILESERVER_HOME_PATH))[1:]
|
||||
homedirs = homedirs_str.split(separator)[1:]
|
||||
|
||||
return homedirs
|
||||
Reference in new issue
Block a user