[gi-docgen/wip/carlosg/multi-content-dir] utils: Raise exception for missing content files
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gi-docgen/wip/carlosg/multi-content-dir] utils: Raise exception for missing content files
- Date: Wed, 23 Jun 2021 16:04:53 +0000 (UTC)
commit e3a6d47ac0a32605dfd0d5c5eec98131404022d6
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Jun 23 17:03:55 2021 +0100
utils: Raise exception for missing content files
If we can't find a content file specified in the project configuration,
then we should bail out.
gidocgen/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gidocgen/utils.py b/gidocgen/utils.py
index ad538a5..c24a773 100644
--- a/gidocgen/utils.py
+++ b/gidocgen/utils.py
@@ -876,4 +876,4 @@ def find_extra_content_file(content_dirs, file):
if os.path.isfile(full_path):
return full_path
- return None
+ raise FileNotFoundError(f"Content file {file} not found in any content directory")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]