Allow specifying a concrete activity when resuming a journal object.
This commit is contained in:
		
							parent
							
								
									099cd4d1b4
								
							
						
					
					
						commit
						5b73d0dfce
					
				| @ -118,7 +118,7 @@ class DSObject(object): | |||||||
|     def is_bundle(self): |     def is_bundle(self): | ||||||
|         return self.metadata['mime_type'] == 'application/vnd.olpc-x-sugar' |         return self.metadata['mime_type'] == 'application/vnd.olpc-x-sugar' | ||||||
| 
 | 
 | ||||||
|     def resume(self): |     def resume(self, service_name=None): | ||||||
|         if self.is_bundle(): |         if self.is_bundle(): | ||||||
|             bundle = Bundle(self.file_path) |             bundle = Bundle(self.file_path) | ||||||
|             if not bundle.is_installed(): |             if not bundle.is_installed(): | ||||||
| @ -126,6 +126,7 @@ class DSObject(object): | |||||||
| 
 | 
 | ||||||
|             activityfactory.create(bundle.get_service_name()) |             activityfactory.create(bundle.get_service_name()) | ||||||
|         else: |         else: | ||||||
|  |             if service_name is None: | ||||||
|                 service_name = self.get_activities()[0].service_name |                 service_name = self.get_activities()[0].service_name | ||||||
| 
 | 
 | ||||||
|             activity_id = self.metadata['activity_id'] |             activity_id = self.metadata['activity_id'] | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Tomeu Vizoso
						Tomeu Vizoso