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: