~yerinalexey/pcrond

6955877523b3d8a4e8a757420c7ba4b2ef89bbf5 — Alexey Yerin 5 months ago 82dc219
fix: get default crontab path properly

Literal "~/.local/crontab" is unreadable without expanding ~
1 files changed, 7 insertions(+), 1 deletions(-)

M scripts/pcrond
M scripts/pcrond => scripts/pcrond +7 -1
@@ 4,12 4,18 @@ VERSION = "1.0"

def parse_args():
    import argparse
    import path
    import os

    default_crontab = path.join(os.environ["HOME"], ".local/crontab")

    parser = argparse.ArgumentParser(description='Launch a crond-like daemon in userspace.')
    parser.add_argument('-r', '--crontabfile',
                        help='the crontab file (default ~/.local/crontab)',
                        default='~/.local/crontab')
                        default=default_crontab)
    parser.add_argument('-v', '--version', action='store_true', help='print version then exit')
    args = parser.parse_args()

    return args

if __name__ == "__main__":