mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Make exceptions handling python 2.4 compatible.
This commit is contained in:
committed by
Michael DeHaan
parent
6854857533
commit
8cc13590b4
@@ -183,7 +183,7 @@ class CronTab(object):
|
||||
f = open(self.cron_file, 'r')
|
||||
self.lines = f.read().splitlines()
|
||||
f.close()
|
||||
except IOError as e:
|
||||
except IOError, e:
|
||||
# cron file does not exist
|
||||
return
|
||||
except:
|
||||
@@ -265,7 +265,7 @@ class CronTab(object):
|
||||
def remove_job_file(self):
|
||||
try:
|
||||
os.unlink(self.cron_file)
|
||||
except OSError as e:
|
||||
except OSError, e:
|
||||
# cron file does not exist
|
||||
return
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user