[dots] Fix for Bug 661910 - Dots spits up when opening extension-less files
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dots] Fix for Bug 661910 - Dots spits up when opening extension-less files
- Date: Sat, 29 Oct 2011 19:40:46 +0000 (UTC)
commit c94862ab88ddcc5c48e559a37e3819a8bed64e8b
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Sun Oct 16 10:11:46 2011 -0400
Fix for Bug 661910 - Dots spits up when opening extension-less files
dots/document_builder.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/dots/document_builder.py b/dots/document_builder.py
index 78777d9..322bd26 100644
--- a/dots/document_builder.py
+++ b/dots/document_builder.py
@@ -64,16 +64,14 @@ except:
def document_new(filename):
- print supported_mime_types
if filename is None:
doc = TextDocument(None)
return doc
mime_type, encoding = mimetypes.guess_type (filename)
- print mime_type
if mime_type not in supported_mime_types:
# Try text/* mimetypes
- if mime_type.startswith("text/"):
+ if not mime_type or mime_type.startswith("text/"):
doc = TextDocument(filename)
return doc
return None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]