mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Use os module for checking absolute/joining paths
This commit is contained in:
parent
d4275e576e
commit
030fbaef64
1 changed files with 4 additions and 3 deletions
|
@ -129,9 +129,10 @@ class CronVar(object):
|
||||||
|
|
||||||
if cron_file:
|
if cron_file:
|
||||||
self.cron_file = ""
|
self.cron_file = ""
|
||||||
if cron_file[0] != '/':
|
if os.path.isabs(cron_file):
|
||||||
self.cron_file = '/etc/cron.d/'
|
self.cron_file = cron_file
|
||||||
self.cron_file = self.cron_file + cron_file
|
else:
|
||||||
|
self.cron_file = os.path.join('/etc/cron.d', cron_file)
|
||||||
else:
|
else:
|
||||||
self.cron_file = None
|
self.cron_file = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue