[releng/alatier/inc-elements] convert-to-tarballs.py: handle .inc elements as well




commit 79fd9853b50f8f34323804fb13a05f528c25173d
Author: Jordan Petridis <jordan centricular com>
Date:   Fri Jul 16 17:01:44 2021 +0300

    convert-to-tarballs.py: handle .inc elements as well

 tools/smoketesting/convert-to-tarballs.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tools/smoketesting/convert-to-tarballs.py b/tools/smoketesting/convert-to-tarballs.py
index 566f913..57a141f 100755
--- a/tools/smoketesting/convert-to-tarballs.py
+++ b/tools/smoketesting/convert-to-tarballs.py
@@ -180,10 +180,10 @@ class ConvertToTarballs:
 
         for directory in directories:
             for filename in os.listdir(directory):
-                if not filename.endswith('.bst'):
+                name, ext = os.path.splitext(filename)
+                if ext not in ('.bst', '.inc'):
                     continue
 
-                name = filename[:-len('.bst')]
                 fullpath = os.path.join(directory, filename)
 
                 with open(fullpath) as f:


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