frontends (jp/blog), plugin blog_import: fixes:
- argparse argument with nargs > 1 and default == {} crashes when reading the user input
- separate blog import options with a new line
- convert DBus strings received by the backend to unicode
This commit is contained in:
parent
12a18b9d51
commit
0eaf531608
1 changed files with 5 additions and 4 deletions
|
|
@ -94,12 +94,13 @@ class BlogImportPlugin(object):
|
|||
|
||||
def _blogImport(self, name, location, options, pubsub_service='', profile=C.PROF_KEY_DEFAULT):
|
||||
client = self.host.getClient(profile)
|
||||
options = {key: unicode(value) for key, value in options.iteritems()}
|
||||
for option in BOOL_OPTIONS:
|
||||
try:
|
||||
options[option] = C.bool(options[option])
|
||||
except KeyError:
|
||||
pass
|
||||
return self.blogImport(client, name, location, options)
|
||||
return self.blogImport(client, unicode(name), unicode(location), options)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def blogImport(self, client, name, location, options=None, pubsub_service=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue