From 9b33cb0ee6b5a70e17f999d36699ca6dc901bcaf Mon Sep 17 00:00:00 2001 From: Jay Sweeney Date: Sat, 9 Nov 2013 14:26:11 +1000 Subject: A set makes more sense (and is faster) than list here --- dotfiles/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/core.py b/dotfiles/core.py index e3ac564..35436a7 100644 --- a/dotfiles/core.py +++ b/dotfiles/core.py @@ -191,7 +191,7 @@ class Dotfiles(object): if not files: dotfiles = self.dotfiles else: - files = list(map(lambda x: os.path.join(self.homedir, x), files)) + files = set(map(lambda x: os.path.join(self.homedir, x), files)) dotfiles = [x for x in self.dotfiles if x.name in files] if not dotfiles: raise Exception("file not found") -- cgit v1.2.3