comparison 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
comparison
equal deleted inserted replaced
337:bc162f60f0a0 338:65453340ae95
118 for path in paths.split(os.path.pathsep): 118 for path in paths.split(os.path.pathsep):
119 if self.game_dir and not os.path.isabs(path): 119 if self.game_dir and not os.path.isabs(path):
120 path = os.path.join(self.game_dir, path) 120 path = os.path.join(self.game_dir, path)
121 yield glob(path) 121 yield glob(path)
122 paths = list(chain(*_expand_paths())) 122 paths = list(chain(*_expand_paths()))
123 if not paths:
124 raise IOError
123 path = paths[0] 125 path = paths[0]
124 if os.path.splitext(path)[1] == '.exe': 126 if os.path.splitext(path)[1] == '.exe':
125 self.exe_files.extend(paths) 127 self.exe_files.extend(paths)
126 else: 128 else:
127 archive_description = ArchiveDescription.get_from_path(path) 129 archive_description = ArchiveDescription.get_from_path(path)