Merge ~bjornt/gitlptools:snap-in-container into ~ubuntuone-hackers/gitlptools:master

Proposed by Björn Tillenius on 2018-09-07
Status: Merged
Approved by: Adam Collard on 2018-09-10
Approved revision: 888ac9099a78617ae0c76254194ec0d2bdcedd27
Merged at revision: b9b96183ecf8c240cae64628010ab470ff61bae2
Proposed branch: ~bjornt/gitlptools:snap-in-container
Merge into: ~ubuntuone-hackers/gitlptools:master
Diff against target: 29 lines (+8/-1)
2 files modified
snap/snapcraft.yaml (+7/-1)
src/gitlptools/__init__.py (+1/-0)
Reviewer Review Type Date Requested Status
Ubuntu One hackers 2018-09-07 Pending
Review via email: mp+354458@code.launchpad.net

Commit message

Allow the snap to be used inside a container.

Before this, if you used it in a container, launchpadlib would
fail talking to the secret storage. When the keyring packages
are installed things seem to work, both inside and outside
containers.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 04aa203..fd7405a 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -25,7 +25,13 @@ parts:
25 # Python3.25 # Python3.
26 # python3-secretstorage is needed so that the LP API credentials can26 # python3-secretstorage is needed so that the LP API credentials can
27 # be saved somewhere.27 # be saved somewhere.
28 stage-packages: [python3-oauth, python3-secretstorage]28 # The keyring packages are needed so that launchpadlib has a place
29 # to store its secrets when running inside containers.
30 stage-packages:
31 - python3-oauth
32 - python3-secretstorage
33 - python3-keyring
34 - python3-keyrings.alt
2935
30 elisp:36 elisp:
31 plugin: dump37 plugin: dump
diff --git a/src/gitlptools/__init__.py b/src/gitlptools/__init__.py
index f9c36d4..8805fa6 100644
--- a/src/gitlptools/__init__.py
+++ b/src/gitlptools/__init__.py
@@ -246,6 +246,7 @@ def git_lp_propose(argv=sys.argv[1:]):
246 except BadRequest as e:246 except BadRequest as e:
247 sys.exit("ERROR: {}".format(e.content.decode('utf-8')))247 sys.exit("ERROR: {}".format(e.content.decode('utf-8')))
248 else:248 else:
249 print('Created MP: {}'.format(mp.web_link))
249 webbrowser.open(mp.web_link)250 webbrowser.open(mp.web_link)
250251
251252

Subscribers

People subscribed via source and target branches