Skip to content

Instantly share code, notes, and snippets.

@MihaiTabara
Forked from rail/generate_macaroon.py
Created July 28, 2017 15:40
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 MihaiTabara/d63e41e4e083befb37b9cc420e187442 to your computer and use it in GitHub Desktop.
Save MihaiTabara/d63e41e4e083befb37b9cc420e187442 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