From bc2e208e37ffa4ecaf44d149f84ebaa83892c49e Mon Sep 17 00:00:00 2001 From: loader Date: Fri, 31 Jul 2015 08:21:57 +0000 Subject: [PATCH 1/2] bump up version to the latest release --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1fa728b5..1aaabf43 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='bench', - version='0.1', + version='0.92', py_modules=find_packages(), include_package_data=True, url='https://github.com/frappe/bench', From d3aa656e5c677b1fd25ad1bdf462e329bec39bdb Mon Sep 17 00:00:00 2001 From: loader Date: Fri, 31 Jul 2015 07:59:18 +0000 Subject: [PATCH 2/2] FreeBSD crontab(1) needs a "-" to read from stdin --- bench/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bench/utils.py b/bench/utils.py index ed7a9730..d0a3f3ab 100644 --- a/bench/utils.py +++ b/bench/utils.py @@ -7,6 +7,7 @@ import logging import itertools import requests import json +import platform import multiprocessing from distutils.spawn import find_executable import pwd, grp @@ -167,7 +168,10 @@ def setup_backups(bench='.'): def add_to_crontab(line): current_crontab = read_crontab() if not line in current_crontab: - s = subprocess.Popen("crontab", stdin=subprocess.PIPE) + cmd = ["crontab"] + if platform.system() == 'FreeBSD': + cmd = ["crontab", "-"] + s = subprocess.Popen(cmd, stdin=subprocess.PIPE) s.stdin.write(current_crontab) s.stdin.write(line + '\n') s.stdin.close()