~ci-train-bot/libertine/libertine-ubuntu-zesty-2341

« back to all changes in this revision

Viewing changes to python/libertine/ContainersConfig.py

  • Committer: Bileto Bot
  • Date: 2016-11-21 19:45:03 UTC
  • mfrom: (171.1.9 libertine.1.4.3-release)
  • Revision ID: ci-train-bot@canonical.com-20161121194503-9jtvays9v8el78ny
Fix old libertine package breaks/replaces version for proper
upgrading. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
def write_container_config_file(container_list):
37
37
    container_config_file = libertine.utils.get_libertine_database_file_path()
38
38
 
 
39
    # Add a warning to adventurous users advising against mucking with this file
 
40
    if container_list is not None:
 
41
        container_list["_warning"] = "This file is automatically generated by Libertine and should not be manually edited."
 
42
 
39
43
    with open(container_config_file, 'w') as fd:
40
44
        fcntl.lockf(fd, fcntl.LOCK_EX)
41
45
        json.dump(container_list, fd, sort_keys=True, indent=4)
322
326
                                                        package_name)
323
327
 
324
328
    """
 
329
    Operations for running apps in a Libertine container.
 
330
    """
 
331
    def add_running_app(self, container_id, app_exec_name, pid=0):
 
332
        app_obj = {'appExecName': app_exec_name, 'pid': pid}
 
333
        self._set_value_by_key(container_id, 'runningApps', app_obj)
 
334
 
 
335
    def delete_running_app(self, container_id, app_exec_name):
 
336
        self._delete_array_object_by_key_value(container_id, 'runningApps',
 
337
                                               'appExecName', app_exec_name)
 
338
 
 
339
    """
325
340
    Fetcher functions for various configuration information.
326
341
    """
327
342
    def get_container_distro(self, container_id):