From 311ca60aa5dbd7a5d538be8fe1750ae98cfd54c4 Mon Sep 17 00:00:00 2001 From: Adam Lewis Date: Sat, 17 Oct 2015 22:03:11 -0500 Subject: [PATCH 1/2] Fix function call on a member string --- src/ice/rom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ice/rom.py b/src/ice/rom.py index 2e969e6..82792fc 100644 --- a/src/ice/rom.py +++ b/src/ice/rom.py @@ -38,7 +38,7 @@ def __eq__(self, other): def prefixed_name(self): prefix = self.console.prefix if prefix: - return "%s %s" % (prefix, self.name()) + return "%s %s" % (prefix, self.name) else: return self.name From 020977fef804fbbec6a6d93d27704da656c256ab Mon Sep 17 00:00:00 2001 From: Adam Lewis Date: Fri, 6 Nov 2015 23:32:37 -0600 Subject: [PATCH 2/2] Hack for recognizing higan/icarus directories --- src/ice/console.py | 2 +- src/ice/filesystem.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ice/console.py b/src/ice/console.py index 1191df7..419edb3 100644 --- a/src/ice/console.py +++ b/src/ice/console.py @@ -44,7 +44,7 @@ def is_valid_rom(self, path): If no extensions are defined for this console, we just accept any file """ - if self.extensions == "": + if self.extensions == "" and os.path.isfile(path): return True extension = os.path.splitext(path)[1].lower() return any(extension == ('.' + x.strip().lower()) diff --git a/src/ice/filesystem.py b/src/ice/filesystem.py index 0bf0aa9..660e1e8 100644 --- a/src/ice/filesystem.py +++ b/src/ice/filesystem.py @@ -30,10 +30,7 @@ def _paths_in_directory(self, directory, incl_subdirs=False): def files_in_directory(self, directory, include_subdirectories=False): assert self.is_directory(directory), "Must specify a directory" - return filter( - os.path.isfile, - self._paths_in_directory(directory, incl_subdirs=include_subdirectories), - ) + return self._paths_in_directory(directory, incl_subdirs=include_subdirectories) def subdirectories_of_directory(self, directory, recursive=False): assert self.is_directory(directory), "Must specify a directory"