summaryrefslogtreecommitdiff
path: root/lib/git/objects/blob.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-28 19:15:42 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-28 19:15:54 +0200
commit1fe889ea0cb2547584075dc1eb77f52c54b9a8c4 (patch)
treecd3685e0bd87441eab4888efbc4e14a232a65a7b /lib/git/objects/blob.py
parent47e3138ee978ce708a41f38a0d874376d7ae5c78 (diff)
downloadgitpython-1fe889ea0cb2547584075dc1eb77f52c54b9a8c4.tar.gz
All tests adjusted to work with the changed internal sha representation
Diffstat (limited to 'lib/git/objects/blob.py')
-rw-r--r--lib/git/objects/blob.py24
1 files changed, 12 insertions, 12 deletions
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