importer: trailing commas

This commit is contained in:
Ryan Farley 2017-11-08 15:11:07 -06:00
parent 8a695648d3
commit 2b7210f6d1

View File

@ -40,7 +40,7 @@ browser_default_input_format = {
'ie': 'netscape', 'ie': 'netscape',
'firefox': 'mozilla', 'firefox': 'mozilla',
'seamonkey': 'mozilla', 'seamonkey': 'mozilla',
'palemoon': 'mozilla' 'palemoon': 'mozilla',
} }
@ -78,7 +78,7 @@ def main():
import_function = { import_function = {
'netscape': import_netscape_bookmarks, 'netscape': import_netscape_bookmarks,
'mozilla': import_moz_places, 'mozilla': import_moz_places,
'chrome': import_chrome 'chrome': import_chrome,
} }
import_function[input_format](args.bookmarks, bookmark_types, import_function[input_format](args.bookmarks, bookmark_types,
output_format) output_format)
@ -332,7 +332,7 @@ def import_chrome(profile, bookmark_types, output_format):
bookmarks = json.load(f) bookmarks = json.load(f)
def bm_tree_walk(bm, template): def bm_tree_walk(bm, template):
assert 'type' in bm assert 'type' in bm, bm
if bm['type'] == 'url': if bm['type'] == 'url':
if urllib.parse.urlparse(bm['url']).scheme != 'chrome': if urllib.parse.urlparse(bm['url']).scheme != 'chrome':
print(template.format(**bm)) print(template.format(**bm))