diff pytouhou/resource/loader.py @ 338:65453340ae95

Print an error when all the needed files aren’t present.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 04 Jul 2012 18:08:57 +0200
parents cddfd3cb4797
children 6d7dbcb31d95
line wrap: on
line diff
--- a/pytouhou/resource/loader.py
+++ b/pytouhou/resource/loader.py
@@ -120,6 +120,8 @@ class Loader(object):
                         path = os.path.join(self.game_dir, path)
                     yield glob(path)
             paths = list(chain(*_expand_paths()))
+            if not paths:
+                raise IOError
             path = paths[0]
             if os.path.splitext(path)[1] == '.exe':
                 self.exe_files.extend(paths)