Ronald Oussoren avatar Ronald Oussoren committed 590df7c

parse_mf_results failed when one of the scripts had a name that didn't end in '.py'

Comments (0)

Files changed (2)


-* ...
+* ``modulegraph.find.modules.parse_mf_results`` failed when the main script of
+  a py2app module didn't have a file name ending in '.py'.


 import warnings
 import modulegraph.modulegraph as modulegraph
-from modulegraph.modulegraph import Alias
+from modulegraph.modulegraph import Alias, Script
 from modulegraph.util import imp_find_module
 __all__ = [
         if src:
             suffix = os.path.splitext(src)[1]
-            if suffix in PY_SUFFIXES:
+            if isinstance(item, Script):
+                # Scripts are python files
+                py_files.append(item)
+            elif suffix in PY_SUFFIXES:
             elif suffix in C_SUFFIXES:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.