Merge ~sylvain-pineau/checkbox-ng:classic-restart-resume into checkbox-ng:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: db9bc932a820f511fbc72d01e717fd27ffd964c3
Merged at revision: cdb8ca7f7d470ceae9c83758587e1f18faf9838f
Proposed branch: ~sylvain-pineau/checkbox-ng:classic-restart-resume
Merge into: checkbox-ng:master
Diff against target: 21 lines (+2/-1)
1 file modified
plainbox/impl/session/restart.py (+2/-1)
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+346875@code.launchpad.net

Description of the change

Fix the linked bug, on classic we don't need to use the snappy restart strategy

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

Neat, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/plainbox/impl/session/restart.py b/plainbox/impl/session/restart.py
2index 0ba0601..eaa1f4d 100644
3--- a/plainbox/impl/session/restart.py
4+++ b/plainbox/impl/session/restart.py
5@@ -28,6 +28,7 @@ import subprocess
6 import tempfile
7
8 from plainbox.impl.secure.config import PlainBoxConfigParser
9+from plainbox.impl.unit.unit import on_ubuntucore
10
11
12 class IRestartStrategy(metaclass=abc.ABCMeta):
13@@ -207,7 +208,7 @@ def detect_restart_strategy() -> IRestartStrategy:
14 """
15 # If we are running as a confined Snappy app this variable will have been
16 # set by the launcher script
17- if(os.getenv("SNAP") or os.getenv("SNAP_APP_PATH")):
18+ if on_ubuntucore():
19 return SnappyRestartStrategy()
20
21 if os.path.isdir('/etc/xdg/autostart'):

Subscribers

People subscribed via source and target branches