[gtk-mac-bundler: 8/12] [Project] Raise an exception if the bundle file has no root node.




commit 3faa36377c23ca469580b67d48eeba00f213078a
Author: John Ralls <jralls ceridwen us>
Date:   Mon Jul 18 12:08:25 2022 -0700

    [Project] Raise an exception if the bundle file has no root node.

 bundler/project.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/bundler/project.py b/bundler/project.py
index ad96ab5..6c564a7 100644
--- a/bundler/project.py
+++ b/bundler/project.py
@@ -506,12 +506,12 @@ class Project(object):
             except:
                 print("Could not load project %s:" % (project_path))
                 raise
-
+        if not self.root:
+            raise Exception("Unable to load the root node.")
         # The directory the project file is in (as opposed to
         # project_path which is the path including the filename).
         self.project_dir, tail = os.path.split(project_path)
         self.meta = self.get_meta()
-
         plist_path = self.get_plist_path()
         try:
             with open(plist_path, "rb") as f:


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