1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-03-20 06:50:23 +03:00

fixed ou with spaces

This commit is contained in:
Adolfo Gómez García 2017-03-29 10:53:34 +02:00
parent de07a4f3cd
commit 92cf8c36bd

View File

@ -62,9 +62,9 @@ class WinDomainOsManager(WindowsOsManager):
self._account = ""
self._password = ""
self._ou = self._ou.replace(' ', '')
# self._ou = self._ou.replace(' ', ''), do not remove spaces
if self._domain != '' and self._ou != '':
lpath = 'dc=' + ',dc='.join(self._domain.split('.'))
lpath = 'dc=' + ',dc='.join((s.lower() for s in self._domain.split('.')))
if self._ou.lower().find(lpath) == -1:
self._ou += ',' + lpath