Commit 104a950f authored by zolliker's avatar zolliker
Browse files

fix cfg file lookup

parent 11d6e7d8
import sys
import socket
from glob import glob
from select import select
from serial import serial_for_url
from subprocess import Popen, PIPE, check_output, call
......@@ -193,5 +194,8 @@ class AcceptHandler:
if __name__ == '__main__':
parser = ConfigParser()'/root/aputools/servercfg/%s.cfg' % socket.gethostname())
cfgfiles = glob('/root/aputools/servercfg/%s_*.cfg' % socket.gethostname())
if len(cfgfiles) != 1:
raise ValueError('there must be one and only one single cfgfile %r' % cfgfiles)[0])['ROUTER'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment