From 851186dc7f1bc8ee2876cb96ddd1315c76af8716 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 14 May 2015 09:39:55 -0400 Subject: [PATCH] Have trans.user_ftp_dir return None instead of error if ftp_upload_dir unset. This is now called on each upload job eb538e00bdfb6cd87c71a620653c91854642b01a and if ftp_upload_dir is None and this was throwing the following exception - https://gist.github.com/jmchilton/fdfb808e13998fbe17bd. --- lib/galaxy/managers/context.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/managers/context.py b/lib/galaxy/managers/context.py index 39471fae855..8190c2a8a09 100644 --- a/lib/galaxy/managers/context.py +++ b/lib/galaxy/managers/context.py @@ -139,7 +139,11 @@ class ProvidesUserContext( object ): @property def user_ftp_dir( self ): identifier = self.app.config.ftp_upload_dir_identifier - return os.path.join( self.app.config.ftp_upload_dir, getattr( self.user, identifier ) ) + base_dir = self.app.config.ftp_upload_dir + if base_dir is None: + return None + else: + return os.path.join( base_dir, getattr( self.user, identifier ) ) class ProvidesHistoryContext( object ):