[damned-lies] Guard against empty source_list in source_files()



commit ec2d20dcc8879b162edf0ad3da6a6e8f3efb601b
Author: Claude Paroz <claude 2xlibre net>
Date:   Fri Sep 14 20:52:06 2018 +0200

    Guard against empty source_list in source_files()

 stats/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/stats/utils.py b/stats/utils.py
index 1b369f60..2d9fbd05 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -102,7 +102,7 @@ class DocFormat:
             return [f for f in self.list_C_files() if f.suffix == '.page']
         if isinstance(source_list, str):
             sources += source_list.split()
-        else:
+        elif source_list:
             sources += source_list
         return [Path('C', src) for src in sources if src not in ('', '$(NULL)')]
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]