mirror of
https://github.com/munki/munki.git
synced 2026-04-22 12:38:23 -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')
|
self._managed_install_dir = munkicommon.pref('ManagedInstallDir')
|
||||||
|
|
||||||
real_cache_dir = os.path.join(self._managed_install_dir, 'swupd')
|
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):
|
if os.path.exists(real_cache_dir):
|
||||||
munki_common.display_error(
|
if not os.path.isdir(real_cache_dir):
|
||||||
'%s exists but is not a dir.', real_cache_dir)
|
munki_common.display_error(
|
||||||
elif not os.path.exists(real_cache_dir):
|
'%s exists but is not a dir.', real_cache_dir)
|
||||||
|
else:
|
||||||
os.mkdir(real_cache_dir)
|
os.mkdir(real_cache_dir)
|
||||||
|
|
||||||
# symlink to work around an issue with paths containing spaces
|
# symlink to work around an issue with paths containing spaces
|
||||||
|
|||||||
Reference in New Issue
Block a user