Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Commit

Permalink
Initial support for not restarting
Browse files Browse the repository at this point in the history
Needs some GUI feedback after the workflow has completed, and shutdown
as an option being implemented.
  • Loading branch information
grahamgilbert committed Apr 21, 2015
1 parent 0e16ba3 commit c772f69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Imagr/MainController.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class MainController(NSObject):
workVolume = None
selectedWorkflow = None
packages_to_install = None
restartAction = 'restart'

def awakeFromNib(self):
self.loginView.setHidden_(self)
Expand All @@ -94,6 +95,8 @@ def loadData(self):
converted_plist = FoundationPlist.readPlistFromString(plistData)
self.passwordHash = converted_plist['password']
self.workflows = converted_plist['workflows']
if 'restart_action' in converted_plist:
self.restartAction = converted_plist['restart_action']
#NSLog(str(workflows))
else:
self.passwordHash = False
Expand Down Expand Up @@ -355,7 +358,8 @@ def processWorkflowOnThreadComplete(self):
'''Done running workflow, restart to imaged volume'''
NSApp.endSheet_(self.imagingProgressPanel)
self.imagingProgressPanel.orderOut_(self)
self.restartToImagedVolume()
if self.restartAction == 'restart':
self.restartToImagedVolume()

def restoreImage(self):
dmgs_to_restore = [item.get('url') for item in self.selectedWorkflow['components']
Expand Down

0 comments on commit c772f69

Please sign in to comment.