[galaxy-commits] commit/galaxy-central: natefoo: Bugfix for distributed object store that prevented certain kwargs from being passed to certain methods in the backend store.

Bitbucket commits-noreply at bitbucket.org
Fri Jan 13 11:17:32 EST 2012


1 new commit in galaxy-central:


https://bitbucket.org/galaxy/galaxy-central/changeset/da1c34c70e25/
changeset:   da1c34c70e25
user:        natefoo
date:        2012-01-13 17:17:25
summary:     Bugfix for distributed object store that prevented certain kwargs from being passed to certain methods in the backend store.
affected #:  1 file

diff -r 6cbf38099b7102b3547595d9949df24b4c699a3c -r da1c34c70e254fa559830342c9fa2b5752375e77 lib/galaxy/objectstore/__init__.py
--- a/lib/galaxy/objectstore/__init__.py
+++ b/lib/galaxy/objectstore/__init__.py
@@ -306,8 +306,8 @@
                 shutil.rmtree(path)
                 return True
             if self.exists(obj, **kwargs):
-                    os.remove(path)
-                    return True
+                os.remove(path)
+                return True
         except OSError, ex:
             log.critical('%s delete error %s' % (self._get_filename(obj, **kwargs), ex))
         return False
@@ -909,20 +909,16 @@
     def size(self, obj, **kwargs):
         return self.__call_method('size', obj, 0, False, **kwargs)
 
-    def delete(self, obj, entire_dir=False, **kwargs):
+    def delete(self, obj, **kwargs):
         return self.__call_method('delete', obj, False, False, **kwargs)
 
-    def get_data(self, obj, start=0, count=-1, **kwargs):
+    def get_data(self, obj, **kwargs):
         return self.__call_method('get_data', obj, ObjectNotFound, True, **kwargs)
 
     def get_filename(self, obj, **kwargs):
         return self.__call_method('get_filename', obj, ObjectNotFound, True, **kwargs)
 
-    def update_from_file(self, obj, file_name=None, create=False, **kwargs):
-        # can raise ObjectLocationMismatch
-        # TODO: handling create=True here?  probably not since create() is called from w/in, so a store will be selected there
-        #if create and not self.exists(obj, **kwargs):
-        #    store_id = random.choice(self.weighted_backend_names)
+    def update_from_file(self, obj, **kwargs):
         return self.__call_method('update_from_file', obj, ObjectNotFound, True, **kwargs)
 
     def get_object_url(self, obj, **kwargs):

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.


More information about the galaxy-commits mailing list