wingo - in flumotion/trunk: . flumotion/admin/command
flumotion-commit at lists.fluendo.com
flumotion-commit at lists.fluendo.com
Wed Jan 24 19:09:06 CET 2007
Author: wingo
Date: Wed Jan 24 19:09:04 2007
New Revision: 4438
Modified:
flumotion/trunk/ChangeLog
flumotion/trunk/flumotion/admin/command/commands.py
Log:
2007-01-24 Andy Wingo <wingo at pobox.com>
* flumotion/admin/commands.py
(_parse_typed_args._do_parse_typed_args): Parse dicts and bools.
For example, {(sb)(is)} foo true 3 bar => {'foo': True, 3=>'bar'}.
Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog (original)
+++ flumotion/trunk/ChangeLog Wed Jan 24 19:09:04 2007
@@ -1,5 +1,9 @@
2007-01-24 Andy Wingo <wingo at pobox.com>
+ * flumotion/admin/commands.py
+ (_parse_typed_args._do_parse_typed_args): Parse dicts and bools.
+ For example, {(sb)(is)} foo true 3 bar => {'foo': True, 3=>'bar'}.
+
* flumotion/admin/gtk/client.py (Window.setPlanetState): Accept
the first flow instead of rejecting any flow not named 'default'.
Modified: flumotion/trunk/flumotion/admin/command/commands.py
==============================================================================
--- flumotion/trunk/flumotion/admin/command/commands.py (original)
+++ flumotion/trunk/flumotion/admin/command/commands.py Wed Jan 24 19:09:04 2007
@@ -23,7 +23,7 @@
from flumotion.twisted.defer import defer_generator
from flumotion.admin.command import utils
from flumotion.common.planet import moods
-from flumotion.common import errors, log, componentui
+from flumotion.common import errors, log, componentui, common
from flumotion.twisted import flavors
from flumotion.twisted.compat import implements
from twisted.internet import defer
@@ -173,11 +173,15 @@
accum = []
while spec:
argtype = spec.pop(0)
- parsers = {'i': int, 's': str}
+ parsers = {'i': int, 's': str, 'b': common.strToBool}
if argtype == ')':
return tuple(accum)
elif argtype == '(':
accum.append(_do_parse_typed_args(spec, args))
+ elif argtype == '}':
+ return dict(accum)
+ elif argtype == '{':
+ accum.append(_do_parse_typed_args(spec, args))
elif argtype not in parsers:
raise ParseException('Unknown argument type: %r'
% argtype)
More information about the flumotion-commit
mailing list