Commits

Patrick Mézard committed 62c474e

codereview: inline line1(), remove unused _change_prolog constant

  • Participants
  • Parent commits 019bbe4

Comments (0)

Files changed (1)

File lib/codereview/codereview.py

 		os.unlink(dir + "/cl." + self.name)
 
 	def Subject(self):
-		s = line1(self.desc)
+		typecheck(self.desc, str)
+		s = self.desc.split('\n')[0]
 		if len(s) > 60:
 			s = s[0:55] + "..."
 		if self.name != "new":
 	typecheck(t, str)
 	return t
 
-# Return the first line of l
-def line1(text):
-	typecheck(text, str)
-	return text.split('\n')[0]
-
-_change_prolog = """# Change list.
-# Lines beginning with # are ignored.
-# Multi-line values should be indented.
-"""
-
 # For use by submit, etc. (NOT by change)
 # Get change list number or list of files from command line.
 # If files are given, make a new change list.