Fix routes for redhat < 6

This commit is contained in:
captaininspiration 2016-04-19 17:47:17 +02:00 committed by Captain Inspiration
parent aaa03bc6e6
commit 640c7a90da

View file

@ -964,8 +964,11 @@ def build_routes(iface, **settings):
'''
template = 'rh6_route_eth.jinja'
if __grains__['osrelease'][0] < 6:
template = 'route_eth.jinja'
try:
if int(__grains__['osrelease'][0]) < 6:
template = 'route_eth.jinja'
except ValueError:
pass
log.debug('Template name: ' + template)
iface = iface.lower()