|
248 |
with open(file_path, 'rb') as fd: |
248 |
with open(file_path, 'rb') as fd: |
249 |
mime = self._ms.buffer(fd.read(4096)) |
249 |
mime = self._ms.buffer(fd.read(4096)) |
250 |
if 'text/plain' in mime: |
250 |
if 'text/plain' in mime: |
251 |
mime = mimetypes.guess_type(file_path)[0] |
251 |
with open(file_path) as source_file: |
|
|
252 |
if 'ucs-test/selenium' in source_file.readline(): |
253 |
mime = 'text/x-python' |
254 |
else: |
255 |
mime = mimetypes.guess_type(file_path)[0] |
252 |
return mime |
256 |
return mime |
253 |
|
257 |
|
254 |
|
258 |
|