Merge pull request #70 from SunilMohanAdapa/remove-contract

Remove dependency on improperly used and unmaintained contract module
This commit is contained in:
Nick Daly 2014-04-13 23:03:58 +00:00
commit c75f3efc90
2 changed files with 1 additions and 9 deletions

View File

@ -17,7 +17,7 @@ default: config dirs template css docs
all: default
predepend:
sudo sh -c "apt-get install augeas-tools libpython2.7 pandoc psmisc python2.7 python-augeas python-passlib python-bcrypt python-bjsonrpc python-cheetah python-cherrypy3 python-simplejson python-contract sudo"
sudo sh -c "apt-get install augeas-tools libpython2.7 pandoc psmisc python2.7 python-augeas python-passlib python-bcrypt python-bjsonrpc python-cheetah python-cherrypy3 python-simplejson sudo"
git submodule init
git submodule update
touch predepend

View File

@ -72,11 +72,9 @@ Actions run commands with this contract (version 1.1):
"""
import contract
import os
import pipes, shlex, subprocess
contract.checkmod(__name__)
def run(action, options = None, async = False):
"""Safely run a specific action as the current user.
@ -104,12 +102,6 @@ def _run(action, options = None, async = False, run_as_root = False):
async: run asynchronously or wait for the command to complete.
run_as_root: execute the command through sudo.
pre:
os.sep not in action
inv:
True # Actions directory hasn't changed. It's hardcoded :)
"""
DIRECTORY = "actions"