Speed optimizations

- don't mount the filesystem if it's already mounted
This commit is contained in:
Carl D. Roth
2018-07-25 13:32:17 -07:00
committed by Jeffrey Townsend
parent d87c2e9c1d
commit a9074bd492

View File

@@ -22,6 +22,8 @@ class OnlBootConfig(object):
def read(self, bc=None):
if bc:
self._readf(bc)
elif os.path.exists(self.BOOT_CONFIG_DEFAULT):
self._readf(self.BOOT_CONFIG_DEFAULT)
else:
from onl.mounts import OnlMountContextReadOnly
with OnlMountContextReadOnly("ONL-BOOT", logger=None):