Skip to content

Commit

Permalink
bug fix: fix empty resolv.conf in al8 reset email config
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Sep 19, 2024
1 parent edebc8b commit 6d7a2c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plogical/mailUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -2537,7 +2537,11 @@ def ResetEmailConfigurations(self):

etcResolve = '/etc/resolv.conf'

dataEtcResolv = open(etcResolve, 'r').read()
if os.path.exists(etcResolve):
dataEtcResolv = open(etcResolve, 'r').read()
else:
dataEtcResolv = ''


if len(dataEtcResolv) < 4:
writeToFile = open(etcResolve, 'w')
Expand Down

0 comments on commit 6d7a2c0

Please sign in to comment.