arek - in flumotion/trunk: . flumotion/admin/command
flumotion-commit at lists.fluendo.com
flumotion-commit at lists.fluendo.com
Tue Sep 18 16:28:42 CEST 2007
Author: arek
Date: Tue Sep 18 16:28:37 2007
New Revision: 5539
Modified:
flumotion/trunk/ChangeLog
flumotion/trunk/flumotion/admin/command/commands.py
flumotion/trunk/flumotion/admin/command/main.py
Log:
* flumotion/admin/command/commands.py (do_avatar_action):
Do not operate on non-existing components. Fixes #757.
* flumotion/admin/command/main.py (parse_commands):
Make command's flow part of the main deferred (and print traceback
on errors, too). Fixes #727.
Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog (original)
+++ flumotion/trunk/ChangeLog Tue Sep 18 16:28:37 2007
@@ -1,3 +1,12 @@
+2007-09-18 Arek Korbik <arkadini at gmail.com>
+
+ * flumotion/admin/command/commands.py (do_avatar_action):
+ Do not operate on non-existing components. Fixes #757.
+
+ * flumotion/admin/command/main.py (parse_commands):
+ Make command's flow part of the main deferred (and print traceback
+ on errors, too). Fixes #727.
+
2007-09-18 Michael Smith <msmith at fluendo.com>
* flumotion/admin/admin.py:
Modified: flumotion/trunk/flumotion/admin/command/commands.py
==============================================================================
--- flumotion/trunk/flumotion/admin/command/commands.py (original)
+++ flumotion/trunk/flumotion/admin/command/commands.py Tue Sep 18 16:28:37 2007
@@ -371,7 +371,9 @@
components = components + planet.get('atmosphere').get('components')
else:
c = utils.find_component(planet, avatarPath[1:])
- components.append(c)
+ if c:
+ components.append(c)
+ # else: message already printed in find_component()
if len(components) > 0:
def actionComponent(c):
Modified: flumotion/trunk/flumotion/admin/command/main.py
==============================================================================
--- flumotion/trunk/flumotion/admin/command/main.py (original)
+++ flumotion/trunk/flumotion/admin/command/main.py Tue Sep 18 16:28:37 2007
@@ -114,7 +114,14 @@
proc = commandspec[3]
def command(model, quit):
- proc(model, quit, *vals)
+ def print_traceback(failure):
+ import traceback
+ warn('Operation %s failed:' % op)
+ traceback.print_exc()
+ return failure
+ d = proc(model, quit, *vals)
+ d.addErrback(print_traceback)
+ return d
return command
More information about the flumotion-commit
mailing list