Lines starting with hashs
Hello,
Thanks for your module. I'm currently testing it and facing the following problem : lines starting with # are not ignored if they have the scheme # .{1,3} .{1,3} ...:
$ cat /var/spool/cron/crontabs/root
...
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
MY_ENV="BLABLA"
@yearly ls /
1 2 3 4 5 cd /
In [1]: from crontab import CronTab
In [2]: cron=CronTab(user=True)
In [3]: for job in cron:
...: print(job)
...:
# # at 5 a.m every week with:
0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
MY_ENV=BLABLA
# m h dom mon dow command
@yearly ls /
1 2 3 4 5 cd /
Shouldn't the regex specifies that the line must not start with # ?
Or am I missing something fully obvious ?
Thanks !
Arnaud