Revision 2c7c0756

b/snf-astakos-app/astakos/im/management/commands/project-control.py
109 109
        if options['terminate_expired']:
110 110
            self.expire(execute=True)
111 111

  
112
    @cmd_project_transaction_context(sync=True)
113
    def run_command(self, func, id, ctx=None):
114
        try:
115
            func(id)
116
        except BaseException as e:
117
            if ctx:
118
                ctx.mark_rollback()
119
            raise CommandError(e)
112
    def run_command(self, func, *args):
113
        with cmd_project_transaction_context(sync=True) as ctx:
114
            try:
115
                func(*args)
116
            except BaseException as e:
117
                if ctx:
118
                    ctx.mark_rollback()
119
                raise CommandError(e)
120 120

  
121 121
    def print_expired(self, projects, execute):
122 122
        length = len(projects)

Also available in: Unified diff