- ip = " URL \"http://"+str(ip_address)+":9103/collectd-post\""
- line = re.sub(r'.*URL.*collectd-post.*', r''+str(ip), line.rstrip())
+ ip = " URL \"http://" + str(ip_address) + ":9103/collectd-post\""
+ line = re.sub(r'.*URL.*collectd-post.*', r'' + str(ip), line.rstrip())