SAAS-1011 - Fixed one mimetype problem and fixed installer

This commit is contained in:
Albert Santoni 2015-08-24 16:25:09 -04:00
parent fdb2d4fae2
commit f21fcb3dcc
3 changed files with 4 additions and 3 deletions

View File

@ -313,8 +313,10 @@ else
fi fi
# Check if composer exists and install if it doesn't # Check if composer exists and install if it doesn't
set +e
eval hash "composer" 2>/dev/null eval hash "composer" 2>/dev/null
commandFound=$? commandFound=$?
set -e
if [[ ! ${commandFound} -eq 0 ]]; then if [[ ! ${commandFound} -eq 0 ]]; then
curl -sS https://getcomposer.org/installer | php curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer mv composer.phar /usr/local/bin/composer

View File

@ -348,7 +348,6 @@ class PypoFetch(Thread):
fileExt = self.sanity_check_media_item(media_item) fileExt = self.sanity_check_media_item(media_item)
dst = os.path.join(download_dir, unicode(media_item['id']) + unicode(fileExt)) dst = os.path.join(download_dir, unicode(media_item['id']) + unicode(fileExt))
media_item['dst'] = dst media_item['dst'] = dst
self.logger.info(media_item['dst'])
media_item['file_ready'] = False media_item['file_ready'] = False
media_filtered[key] = media_item media_filtered[key] = media_item
@ -378,7 +377,7 @@ class PypoFetch(Thread):
end = datetime.strptime(media_item['end'], "%Y-%m-%d-%H-%M-%S") end = datetime.strptime(media_item['end'], "%Y-%m-%d-%H-%M-%S")
mime = media_item['metadata']['mime'] mime = media_item['metadata']['mime']
mimetypes.init("%s/mime.types" % os.path.dirname(os.path.realpath(__file__))) mimetypes.init(["%s/mime.types" % os.path.dirname(os.path.realpath(__file__))])
mime_ext = mimetypes.guess_extension(mime, strict=False) mime_ext = mimetypes.guess_extension(mime, strict=False)
length1 = pure.date_interval_to_seconds(end - start) length1 = pure.date_interval_to_seconds(end - start)

View File

@ -61,7 +61,7 @@ class PypoFile(Thread):
media_item['file_ready'] = not do_copy media_item['file_ready'] = not do_copy
if do_copy: if do_copy:
self.logger.debug("copying from %s to local cache %s" % (src, dst)) self.logger.info("copying from %s to local cache %s" % (src, dst))
try: try:
CONFIG_SECTION = "general" CONFIG_SECTION = "general"
username = self._config.get(CONFIG_SECTION, 'api_key') username = self._config.get(CONFIG_SECTION, 'api_key')