mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-27 09:21:59 -06:00
Check for existance of of the target file in update_file. It used to silently
fail if the file it was to update didn't exist.
This commit is contained in:
parent
6f268a185c
commit
949b4a0bf7
@ -50,6 +50,10 @@ def update_file(filename, orig, subst):
|
||||
else:
|
||||
sys.stdout.write(p.sub(subst, line))
|
||||
fileinput.close()
|
||||
return 0
|
||||
else:
|
||||
print "File %s doesn't exist." % filename
|
||||
return 1
|
||||
|
||||
class HTTPInstance(service.Service):
|
||||
def __init__(self):
|
||||
@ -137,4 +141,5 @@ class HTTPInstance(service.Service):
|
||||
|
||||
def __set_mod_nss_port(self):
|
||||
self.step("Setting mod_nss port to 443")
|
||||
update_file(NSS_CONF, '8443', '443')
|
||||
if update_file(NSS_CONF, '8443', '443') != 0:
|
||||
print "Updating %s failed." % NSS_CONF
|
||||
|
Loading…
Reference in New Issue
Block a user