Skip to content

Commit cf465b2

Browse files
committed
Fix: regression in realm.clearUserCache() from 9a8adc2
1 parent 704da0e commit cf465b2

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

usr/lib/python3/dist-packages/linuxmusterLinuxclient7/imageHelper.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,13 @@ def _clearUserCache(unattended=False):
126126
if not _checkLoggedInUsers():
127127
return False
128128

129-
realm.clearUserCache()
129+
result = realm.clearUserCache()
130+
if not result:
131+
logging.error("Failed to clear user cache!")
132+
return False
130133

131134
logging.info("Done.")
132-
133-
return realm.clearUserCache()
135+
return True
134136

135137
def _unmountAllCifsMounts():
136138
logging.info("Unmounting all CIFS mounts!")

usr/lib/python3/dist-packages/linuxmusterLinuxclient7/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ def setup(domain=None, user=None):
1515
"""
1616
logging.info('#### linuxmuster-linuxclient7 setup ####')
1717

18-
if not realm.clearUserCache():
18+
userCacheCleared = realm.clearUserCache()
19+
if not userCacheCleared and isSetup():
1920
return False
2021

2122
if not _cleanOldDomainJoins():

0 commit comments

Comments
 (0)