Commit 8cc13590 by Michael DeHaan Committed by Michael DeHaan

Make exceptions handling python 2.4 compatible.

parent 68548575
...@@ -183,7 +183,7 @@ class CronTab(object): ...@@ -183,7 +183,7 @@ class CronTab(object):
f = open(self.cron_file, 'r') f = open(self.cron_file, 'r')
self.lines = f.read().splitlines() self.lines = f.read().splitlines()
f.close() f.close()
except IOError as e: except IOError, e:
# cron file does not exist # cron file does not exist
return return
except: except:
...@@ -265,7 +265,7 @@ class CronTab(object): ...@@ -265,7 +265,7 @@ class CronTab(object):
def remove_job_file(self): def remove_job_file(self):
try: try:
os.unlink(self.cron_file) os.unlink(self.cron_file)
except OSError as e: except OSError, e:
# cron file does not exist # cron file does not exist
return return
except: except:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment