From 5bdd63165d1ad1ea77ac961dde388b9d63a934e6 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sat, 3 Jul 2010 15:01:06 +0200 Subject: [PATCH] add a tool to convert storages to new format --- tools/storage_convert.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 tools/storage_convert.py diff --git a/tools/storage_convert.py b/tools/storage_convert.py new file mode 100755 index 00000000..a140b0c1 --- /dev/null +++ b/tools/storage_convert.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +from __future__ import with_statement + +import sys + +for name in sys.argv[1:]: + with open(name, 'r') as f: + lines = f.readlines() + + with open(name, 'w') as f: + f.write('backends:\n') + for line in lines: + f.write(' %s' % line)