Show More
@@ -7,7 +7,7 b'' | |||
|
7 | 7 | |
|
8 | 8 | :created_on: Apr 9, 2010 |
|
9 | 9 | :author: marcink |
|
10 |
:copyright: (C) 20 |
|
|
10 | :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com> | |
|
11 | 11 | :license: GPLv3, see COPYING for more details. |
|
12 | 12 | """ |
|
13 | 13 | # This program is free software: you can redistribute it and/or modify |
@@ -26,6 +26,7 b' import os' | |||
|
26 | 26 | import time |
|
27 | 27 | import traceback |
|
28 | 28 | import logging |
|
29 | import cStringIO | |
|
29 | 30 | |
|
30 | 31 | from sqlalchemy.exc import DatabaseError |
|
31 | 32 | |
@@ -370,8 +371,12 b' class ScmModel(BaseModel):' | |||
|
370 | 371 | |
|
371 | 372 | if isinstance(content, (basestring,)): |
|
372 | 373 | content = safe_str(content) |
|
373 | elif isinstance(content, file): | |
|
374 | elif isinstance(content, (file, cStringIO.OutputType,)): | |
|
374 | 375 | content = content.read() |
|
376 | else: | |
|
377 | raise Exception('Content is of unrecognized type %s' % ( | |
|
378 | type(content) | |
|
379 | )) | |
|
375 | 380 | |
|
376 | 381 | message = safe_str(message) |
|
377 | 382 | path = safe_str(f_path) |
General Comments 0
You need to be logged in to leave comments.
Login now