From 1fe889ea0cb2547584075dc1eb77f52c54b9a8c4 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 28 Jun 2010 19:15:42 +0200 Subject: All tests adjusted to work with the changed internal sha representation --- lib/git/objects/blob.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/git/objects/blob.py') diff --git a/lib/git/objects/blob.py b/lib/git/objects/blob.py index ed7a8d04..8263e9a2 100644 --- a/lib/git/objects/blob.py +++ b/lib/git/objects/blob.py @@ -10,11 +10,11 @@ import base __all__ = ('Blob', ) class Blob(base.IndexObject): - """A Blob encapsulates a git blob object""" - DEFAULT_MIME_TYPE = "text/plain" - type = "blob" + """A Blob encapsulates a git blob object""" + DEFAULT_MIME_TYPE = "text/plain" + type = "blob" - __slots__ = "data" + __slots__ = "data" def _set_cache_(self, attr): if attr == "data": @@ -26,11 +26,11 @@ class Blob(base.IndexObject): super(Blob, self)._set_cache_(attr) # END handle data - @property - def mime_type(self): - """ :return:String describing the mime type of this file (based on the filename) - :note: Defaults to 'text/plain' in case the actual file type is unknown. """ - guesses = None - if self.path: - guesses = guess_type(self.path) - return guesses and guesses[0] or self.DEFAULT_MIME_TYPE + @property + def mime_type(self): + """ :return:String describing the mime type of this file (based on the filename) + :note: Defaults to 'text/plain' in case the actual file type is unknown. """ + guesses = None + if self.path: + guesses = guess_type(self.path) + return guesses and guesses[0] or self.DEFAULT_MIME_TYPE -- cgit v1.2.1