PageRenderTime 21ms CodeModel.GetById 12ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/scripts/api/history_delete_history.py

https://bitbucket.org/cistrome/cistrome-harvard/
Python | 18 lines | 14 code | 3 blank | 1 comment | 0 complexity | dc1ede77b001734f558ca2afb081641c MD5 | raw file
 1#!/usr/bin/env python
 2
 3import os, sys
 4sys.path.insert( 0, os.path.dirname( __file__ ) )
 5from common import delete
 6
 7try:
 8    assert sys.argv[2]
 9except IndexError:
10    print 'usage: %s key url [purge (true/false)] ' % os.path.basename( sys.argv[0] )
11    sys.exit( 1 )
12try:
13    data = {}
14    data[ 'purge' ] = sys.argv[3]
15except IndexError:
16    pass
17
18delete( sys.argv[1], sys.argv[2], data )