From 100a6b56b65319999905fb5c91b5a1862308c208 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Wed, 5 Aug 2015 17:13:17 -0300 Subject: [PATCH] Check if parameter 'options' is None in cmd_dist_xo When is used to clone a activity from sugar, the options parameter is set to None. The other uses of no_fail have False as default value but this case was missing. The effect of this error is that a .xo is not created in the Journal, when the user select 'Duplicate' in the View Source window. --- src/sugar3/activity/bundlebuilder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sugar3/activity/bundlebuilder.py b/src/sugar3/activity/bundlebuilder.py index 80a548e0..de1346b8 100644 --- a/src/sugar3/activity/bundlebuilder.py +++ b/src/sugar3/activity/bundlebuilder.py @@ -350,8 +350,11 @@ def cmd_dev(config, options): def cmd_dist_xo(config, options): """Create a xo bundle package""" + no_fail = False + if options is not None: + no_fail = options.no_fail - packager = XOPackager(Builder(config, options.no_fail)) + packager = XOPackager(Builder(config, no_fail)) packager.package()