Skip to content

Instantly share code, notes, and snippets.

@rail
Created April 25, 2017 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rail/cd052897ae16ebd4c90078920cb131cd to your computer and use it in GitHub Desktop.
Save rail/cd052897ae16ebd4c90078920cb131cd to your computer and use it in GitHub Desktop.
import sys
from snapcraft import storeapi
from snapcraft._store import _login
def main():
packages = [{'name': "firefox", 'series':
storeapi.constants.DEFAULT_SERIES}]
channels = ['edge']
store = storeapi.StoreClient()
if not _login(store, packages=packages, channels=channels, save=False):
raise RuntimeError('Bad Auth')
store.conf.parser.write(sys.stdout)
sys.stdout.flush()
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment