update_config_0.4.x-0.5.py
changeset 119 014335f38962
parent 118 cf85d78486ce
child 130 9dca3e898ddb
equal deleted inserted replaced
118:cf85d78486ce 119:014335f38962
    12 
    12 
    13 
    13 
    14 def get_config_file():
    14 def get_config_file():
    15     f = None
    15     f = None
    16     for d in ('/root', '/usr/local/etc', '/etc'):
    16     for d in ('/root', '/usr/local/etc', '/etc'):
    17         if os.path.isfile(d+'/vmm.cfg'):
    17         tmp = os.path.join(d, 'vmm.cfg')
    18             f = d+'/vmm.cfg'
    18         if os.path.isfile(tmp):
       
    19             f = tmp
    19             break
    20             break
    20     if f:
    21     if f:
    21         return f
    22         return f
    22     else:
    23     else:
    23         os.sys.stderr.write('error: vmm.cfg not found\n')
    24         os.sys.stderr.write('error: vmm.cfg not found\n')