def _cleanup_data_dir(self): if self._data_dir is not None: set_restrictive_permissions(self._data_dir)
def _permissions(self, filename): f = self._abspath(filename) if os.path.exists(f): set_restrictive_permissions(f, allow_execute=False)