Mercurial > hg > Applications > virsh-wrapper
view change_vagrantfile.py @ 30:2888c7ec9013
can't define vm name is not number.
author | taiki <taiki@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 02 Sep 2014 08:10:27 -1000 |
parents | f194adc597b6 |
children |
line wrap: on
line source
#!/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: