Skip to content

Commit cf38c9b

Browse files
committed
Add a --json-module command-line option to the couchdb-replicate script.
--HG-- extra : convert_revision : svn%3A7a298fb0-333a-0410-83e7-658617cd9cf3/trunk%40176
1 parent 561d612 commit cf38c9b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

couchdb/tools/replication_helper.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,13 @@ def main():
170170
dest='ignore_deletes',
171171
help='whether to ignore "delete" notifications',
172172
default=True)
173+
parser.add_option('--json-module',
174+
action='store',
175+
dest='json_module',
176+
metavar='NAME',
177+
help='the JSON module to use ("simplejson", "cjson", or "json" are '
178+
'supported)',
179+
default=True)
173180

174181
options, arg = parser.parse_args()
175182

@@ -178,7 +185,10 @@ def main():
178185
sys.exit(1)
179186

180187
options.target_servers = options.target_servers.split(',')
181-
188+
189+
if options.json_module:
190+
json.use(options.json_module)
191+
182192
ReplicationHelper(options)()
183193

184194
if __name__ == '__main__':

0 commit comments

Comments
 (0)