comparison piecrust/sources/posts.py @ 1194:09d5c233e840 draft

sources: Fix bug checking config setting.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 30 Dec 2022 16:49:32 -0800
parents 4cc020ff2537
children
comparison
equal deleted inserted replaced
1193:032920568ba7 1194:09d5c233e840
219 InteractiveField('day', InteractiveField.TYPE_INT, dt.day), 219 InteractiveField('day', InteractiveField.TYPE_INT, dt.day),
220 InteractiveField('slug', InteractiveField.TYPE_STRING, 'new-post')] 220 InteractiveField('slug', InteractiveField.TYPE_STRING, 'new-post')]
221 221
222 def _checkFsEndpointPath(self): 222 def _checkFsEndpointPath(self):
223 if not os.path.isdir(self.fs_endpoint_path): 223 if not os.path.isdir(self.fs_endpoint_path):
224 if self.ignore_missing_dir: 224 if self.config.get('ignore_missing_dir'):
225 return False 225 return False
226 raise InvalidFileSystemEndpointError(self.name, 226 raise InvalidFileSystemEndpointError(self.name,
227 self.fs_endpoint_path) 227 self.fs_endpoint_path)
228 return True 228 return True
229 229