Created
October 5, 2015 21:30
-
-
Save schakrava/37120621c81c963422cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
join = os.path.join | |
base = os.path.dirname(os.path.abspath(os.path.realpath(__file__))) | |
base = os.path.dirname(base) | |
import sys | |
sys.path[0:0] = [ | |
join(base, 'src/rockstor'), | |
join(base, 'eggs/supervisor-3.0b1-py2.7.egg'), | |
join(base, 'eggs/meld3-1.0.2-py2.7.egg'), | |
join(base, 'eggs/setuptools-18.3.2-py2.7.egg'), | |
join(base, 'eggs/psutil-3.2.1-py2.7-linux-x86_64.egg'), | |
join(base, 'eggs/psycogreen-1.0-py2.7.egg'), | |
join(base, 'eggs/gevent_socketio-0.3.6-py2.7.egg'), | |
join(base, 'eggs/coverage-4.0-py2.7-linux-x86_64.egg'), | |
join(base, 'eggs/mock-1.0.1-py2.7.egg'), | |
join(base, 'eggs/django_ztask-0.1.5-py2.7.egg'), | |
join(base, 'eggs/six-1.7.3-py2.7.egg'), | |
join(base, 'eggs/django_oauth_toolkit-0.7.0-py2.7.egg'), | |
join(base, 'eggs/psycopg2-2.6-py2.7-linux-x86_64.egg'), | |
join(base, 'eggs/South-0.8.4-py2.7.egg'), | |
join(base, 'eggs/pyzmq-13.0.0-py2.7-linux-x86_64.egg'), | |
join(base, 'eggs/requests-1.1.0-py2.7.egg'), | |
join(base, 'eggs/django_pipeline-1.2.23-py2.7.egg'), | |
join(base, 'eggs/pytz-2014.3-py2.7.egg'), | |
join(base, 'eggs/djangorestframework-3.1.1-py2.7.egg'), | |
join(base, 'eggs/URLObject-2.1.1-py2.7.egg'), | |
join(base, 'eggs/distribute-0.7.3-py2.7.egg'), | |
join(base, 'eggs/Django-1.6.2-py2.7.egg'), | |
join(base, 'eggs/gevent_websocket-0.9.5-py2.7.egg'), | |
join(base, 'eggs/gevent-1.0.2-py2.7-linux-x86_64.egg'), | |
join(base, 'eggs/oauthlib-0.6.1-py2.7.egg'), | |
join(base, 'eggs/django_braces-1.8.1-py2.7.egg'), | |
join(base, 'eggs/greenlet-0.4.9-py2.7-linux-x86_64.egg'), | |
] | |
import scripts.delete_api_key | |
if __name__ == '__main__': | |
from storageadmin.models import UpdateSubscription | |
try: | |
us = UpdateSubscription.objects.get(name='Stable') | |
us.delete() | |
print ('Stable subscription deleted') | |
except UpdateSubscription.DoesNotExist: | |
print ('No active subscription found. Already deleted, perhaps') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment