mirror of
https://github.com/munki/munki.git
synced 2026-03-14 13:30:47 -05:00
Remove duplicate os.path.exists() calls when checking for real_cache_dir existence.
This commit is contained in:
@@ -122,10 +122,11 @@ class AppleUpdates(object):
|
||||
self._managed_install_dir = munkicommon.pref('ManagedInstallDir')
|
||||
|
||||
real_cache_dir = os.path.join(self._managed_install_dir, 'swupd')
|
||||
if os.path.exists(real_cache_dir) and not os.path.isdir(real_cache_dir):
|
||||
munki_common.display_error(
|
||||
'%s exists but is not a dir.', real_cache_dir)
|
||||
elif not os.path.exists(real_cache_dir):
|
||||
if os.path.exists(real_cache_dir):
|
||||
if not os.path.isdir(real_cache_dir):
|
||||
munki_common.display_error(
|
||||
'%s exists but is not a dir.', real_cache_dir)
|
||||
else:
|
||||
os.mkdir(real_cache_dir)
|
||||
|
||||
# symlink to work around an issue with paths containing spaces
|
||||
|
||||
Reference in New Issue
Block a user