check files exist before trying to remove them when deleting a provider
This commit is contained in:
parent
0e88c1c76e
commit
c16d8cff03
|
@ -155,9 +155,9 @@ class LibertyIDPUI(Directory):
|
|||
metadata_fn = os.path.join(wcs.app_dir, 'idp-%s-metadata.xml' % self.idpk)
|
||||
publickey_fn = os.path.join(wcs.app_dir, 'idp-%s-publickey.pem' % self.idpk)
|
||||
cacertchain_fn = os.path.join(wcs.app_dir, 'idp-%s-cacertchain.pem' % self.idpk)
|
||||
os.unlink(metadata_fn)
|
||||
os.unlink(publickey_fn)
|
||||
os.unlink(cacertchain_fn)
|
||||
for f in (metadata_fn, publickey_fn, cacertchain_fn):
|
||||
if os.path.exists(f):
|
||||
os.unlink(f)
|
||||
wcs.misc.write_cfg()
|
||||
return redirect('..')
|
||||
|
||||
|
|
Loading…
Reference in New Issue