commit/galaxy-central: natefoo: Object store fixes for Python 2.5. S3 not currently supported on 2.5, although it can most likely be worked around.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/50af255c3b9c/ changeset: 50af255c3b9c user: natefoo date: 2012-01-24 16:32:18 summary: Object store fixes for Python 2.5. S3 not currently supported on 2.5, although it can most likely be worked around. affected #: 1 file diff -r cea740227c3e234cf702867217edfe27d4adfd06 -r 50af255c3b9cb5cecf6b04814d3736a96f4489da lib/galaxy/objectstore/__init__.py --- a/lib/galaxy/objectstore/__init__.py +++ b/lib/galaxy/objectstore/__init__.py @@ -5,6 +5,7 @@ """ import os +import sys import time import random import shutil @@ -12,20 +13,21 @@ import logging import threading import subprocess -import multiprocessing from datetime import datetime from galaxy import util from galaxy.jobs import Sleeper from galaxy.model import directory_hash_id -from galaxy.objectstore.s3_multipart_upload import multipart_upload from galaxy.exceptions import ObjectNotFound, ObjectInvalid from sqlalchemy.orm import object_session -from boto.s3.key import Key -from boto.s3.connection import S3Connection -from boto.exception import S3ResponseError +if sys.version_info >= (2, 6): + import multiprocessing + from galaxy.objectstore.s3_multipart_upload import multipart_upload + from boto.s3.key import Key + from boto.s3.connection import S3Connection + from boto.exception import S3ResponseError log = logging.getLogger( __name__ ) logging.getLogger('boto').setLevel(logging.INFO) # Otherwise boto is quite noisy @@ -372,6 +374,7 @@ Galaxy and S3. """ def __init__(self, config): + assert sys.version_info >= (2, 6), 'S3 Object Store support requires Python >= 2.6' super(S3ObjectStore, self).__init__() self.config = config self.staging_path = self.config.file_path @@ -564,7 +567,7 @@ # # print "Checking cache for %s; returning %s" % (cache_path, exists) # return exists # # return False - + def _pull_into_cache(self, rel_path): # Ensure the cache directory structure exists (e.g., dataset_#_files/) rel_path_dir = os.path.dirname(rel_path) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket