From 8ed3d79cc208754d5aa653023c7bfcb11855ac90 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Mon, 25 May 2015 16:57:28 +0100 Subject: [PATCH] Only upload plugin if file exists #4695 Some platforms (e.g. Mac 10.6) don't build the plugin --- ext/toolchain/commands1.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py index 601f04eb..a051ee14 100644 --- a/ext/toolchain/commands1.py +++ b/ext/toolchain/commands1.py @@ -1355,11 +1355,12 @@ class InternalCommands: packageTarget = self.dist_name_rev(type) ftp.upload(packageSource, packageTarget) - if (type != 'src'): + if type != 'src': pluginsDir = binDir + '/plugins' nsPluginSource = self.findLibraryFile(type, pluginsDir, 'ns') - nsPluginTarget = self.getLibraryDistFilename(type, pluginsDir, 'ns') - ftp.upload(nsPluginSource, nsPluginTarget, "plugins") + if nsPluginSource: + nsPluginTarget = self.getLibraryDistFilename(type, pluginsDir, 'ns') + ftp.upload(nsPluginSource, nsPluginTarget, "plugins") def getLibraryDistFilename(self, type, dir, name): (platform, packageExt, libraryExt) = self.getDistributePlatformInfo(type) @@ -1384,7 +1385,7 @@ class InternalCommands: if re.search(pattern, filename): return dir + '/' + filename - raise Exception('Could not find library name with pattern: ' + pattern) + return None def getDistributePlatformInfo(self, type): ext = None