Break long lines, update NEWS.
authorJelmer Vernooij <jelmer@samba.org>
Fri, 7 Mar 2014 19:53:37 +0000 (19:53 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 7 Mar 2014 19:53:37 +0000 (19:53 +0000)
NEWS
dulwich/repo.py
dulwich/tests/test_repository.py

diff --git a/NEWS b/NEWS
index 5ce70b3378c389302c3ae648b967ac70b989800b..9d8c3432e8993f3c6a17d7730608a3518fee8551 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,15 @@
 
  * Add porcelain 'pull'. (Ryan Faulkner)
 
+ BUG FIXES
+
+ * Support unseekable 'wsgi.input' streams.
+   (Jonas Haag)
+
+ * Raise TypeError when passing unicode() object
+   to Repo.__getitem__.
+   (Jonas Haag)
+
 0.9.5  2014-02-23
 
  IMPROVEMENTS
index 6f7e56198628cf57fd609bf36d22388877e1b343..6742de32019efdab1da714d8303a8ad1d7566f45 100644 (file)
@@ -439,8 +439,9 @@ class BaseRepo(object):
         :return: A `ShaFile` object, such as a Commit or Blob
         :raise KeyError: when the specified ref or object does not exist
         """
-        if not isinstance(name, str):
-            raise TypeError("'name' must be bytestring, not %.80s" % type(name).__name__)
+        if type(name) != str:
+            raise TypeError("'name' must be bytestring, not %.80s" %
+                    type(name).__name__)
         if len(name) in (20, 40):
             try:
                 return self.object_store[name]
index 6e1435dd1a14e10d2bc55a642d13a3b9a6e806d0..175c26cc17f6c0ec4e6bba8855aedc2de9f3e07e 100644 (file)
@@ -108,7 +108,7 @@ class RepositoryTests(TestCase):
         self.assertEqual('a90fa2d900a17e99b433217e988c4eb4a2e9a097',
                           r["refs/tags/foo"].id)
 
-    def test_getitem_notfound_unicode(self):
+    def test_getitem_unicode(self):
         r = self._repo = open_repo('a.git')
 
         test_keys = [