mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-28 14:50:14 +03:00
Return nodomain backend in case there is no domain yet (for bootsrap)
This commit is contained in:
parent
5e89b28069
commit
b0502a9681
@ -31,10 +31,16 @@ def backend_factory(dc, username):
|
||||
domain = sc.get_domain()
|
||||
back = None
|
||||
|
||||
try:
|
||||
back = samba_backend(sc, username, domain)
|
||||
except Exception as exc:
|
||||
logging.error('Unable to initialize Samba backend: {}'.format(exc))
|
||||
if dc:
|
||||
try:
|
||||
back = samba_backend(sc, username, domain)
|
||||
except Exception as exc:
|
||||
logging.error('Unable to initialize Samba backend: {}'.format(exc))
|
||||
else:
|
||||
try:
|
||||
back = nodomain_backend()
|
||||
except Exception as exc:
|
||||
logging.error('Unable to initialize no-domain backend: {}'.format(exc))
|
||||
|
||||
return back
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user