From 0fd875b74feb80bd413b6d2ca3a35362df23bf2a Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Tue, 8 Dec 2009 17:05:35 -0500 Subject: [PATCH] Change the way that the check for if dataset hashed directories exists is handled. --- lib/galaxy/model/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index 91c382354b5..cad29732536 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -374,12 +374,8 @@ class Dataset( object ): if not os.path.exists( filename ): dir = os.path.join( self.file_path, *directory_hash_id( self.id ) ) # Create directory if it does not exist - try: + if not os.path.exists( dir ): os.makedirs( dir ) - except OSError, e: - # File Exists is okay, otherwise reraise - if e.errno != errno.EEXIST: - raise # Return filename inside hashed directory return os.path.abspath( os.path.join( dir, "dataset_%d.dat" % self.id ) ) else: