Fix VCSBackend.original_year() bug in applying per-file year_hacks.
authorW. Trevor King <wking@drexel.edu>
Thu, 16 Feb 2012 19:34:58 +0000 (14:34 -0500)
committerW. Trevor King <wking@drexel.edu>
Thu, 16 Feb 2012 19:34:58 +0000 (14:34 -0500)
The per-file value is a single integer, so use `.add` instead of `.update`.

update_copyright/vcs/__init__.py

index c4f69f7c2f2317fe5b7285ff4a91d8c3fc9fce63..1133795a3564147d850afeca8c2ac33298195aaf 100644 (file)
@@ -43,7 +43,7 @@ class VCSBackend (object):
         if filename is None:
             years.update(self._year_hacks.values())
         elif _utils.splitpath(filename) in self._year_hacks:
-            years.update(self._year_hacks[_utils.splitpath(filename)])
+            years.add(self._year_hacks[_utils.splitpath(filename)])
         years = sorted(years)
         return years[0]