Skip to content

Instantly share code, notes, and snippets.

@urkonn
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save urkonn/8ab91363553b473859d7 to your computer and use it in GitHub Desktop.
Save urkonn/8ab91363553b473859d7 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import ckanapi
import subprocess
ckan_instance = ckanapi.RemoteCKAN('http://192.168.33.20:8080',
apikey='XXXXX',
user_agent='ckanapi/1.0')
try:
pkg = ckan_instance.action.package_update(id='xxxxx', license_id='')
except ckanapi.NotAuthorized:
print 'denied'
print ckan_instance.action.package_show(id='xxxxx')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment