Mercurial > hg > Applications > virsh-wrapper
diff change_vagrantfile.py @ 15:f194adc597b6
add source to edit vagrantfile.
author | taiki |
---|---|
date | Tue, 12 Nov 2013 01:50:50 -1000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/change_vagrantfile.py Tue Nov 12 01:50:50 2013 -1000 @@ -0,0 +1,20 @@ +#!/usr/bin/python +# -*- encoding: utf-8 -*- + +import sys,os + +FILE = "Vagrantfile" + +if not os.path.exists(FILE): + print(FILE + ":file not found.") + sys.exit(1) + +f = open(FILE) + +file_tmp = [] +for line in f: + file_tmp.append(line) + +for l in file_tmp: + if 'config.vm.network :private_network' in l: +