Stop worrying about trailing newlines in get_filenames() overrides. trunk

Wed, 23 Jul 2008 12:01:58 -0400

author
Brett Smith <brettcsmith@brettcsmith.org>
date
Wed, 23 Jul 2008 12:01:58 -0400
branch
trunk
changeset 82
6db35db38795
parent 81
18f4fe62eff2
child 83
cb56c72f3d42

Stop worrying about trailing newlines in get_filenames() overrides.

Now that all the get_filenames implementations call out to the original,
which takes care of the trailing newline, we don't need to keep doing it in
other methods.

scripts/dtrx file | annotate | diff | comparison | revisions
--- a/scripts/dtrx	Sun Jul 20 22:24:49 2008 -0400
+++ b/scripts/dtrx	Wed Jul 23 12:01:58 2008 -0400
@@ -468,7 +468,7 @@
                 else:
                     fn_index = line.rindex(' ') + 1
             elif fn_index is not None:
-                yield line[fn_index:-1]
+                yield line[fn_index:]
         self.archive.close()
         
 
@@ -486,7 +486,7 @@
                 break
         for line in filenames:
             try:
-                yield line.split(' | ', 2)[2].rstrip('\n')
+                yield line.split(' | ', 2)[2]
             except IndexError:
                 break
         self.archive.close()
@@ -506,7 +506,7 @@
             else:
                 match = self.prefix_re.match(line)
                 if match:
-                    yield line[match.end():].rstrip('\n')
+                    yield line[match.end():]
         self.archive.close()
 
     def basename(self):

mercurial