summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--subcmds/stage.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/subcmds/stage.py b/subcmds/stage.py
index ff15ee0c..28849764 100644
--- a/subcmds/stage.py
+++ b/subcmds/stage.py
@@ -49,7 +49,7 @@ The '%prog' command stages files to prepare the next commit.
49 self.Usage() 49 self.Usage()
50 50
51 def _Interactive(self, opt, args): 51 def _Interactive(self, opt, args):
52 all_projects = filter(lambda x: x.IsDirty(), self.GetProjects(args)) 52 all_projects = [p for p in self.GetProjects(args) if p.IsDirty()]
53 if not all_projects: 53 if not all_projects:
54 print('no projects have uncommitted modifications', file=sys.stderr) 54 print('no projects have uncommitted modifications', file=sys.stderr)
55 return 55 return
@@ -98,9 +98,9 @@ The '%prog' command stages files to prepare the next commit.
98 _AddI(all_projects[a_index - 1]) 98 _AddI(all_projects[a_index - 1])
99 continue 99 continue
100 100
101 p = filter(lambda x: x.name == a or x.relpath == a, all_projects) 101 projects = [p for p in all_projects if a in [p.name, p.relpath]]
102 if len(p) == 1: 102 if len(projects) == 1:
103 _AddI(p[0]) 103 _AddI(projects[0])
104 continue 104 continue
105 print('Bye.') 105 print('Bye.')
106 106