Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
d2e16c8d
Commit
d2e16c8d
authored
Mar 26, 2013
by
Giorgos Korfiatis
Browse files
Change helper function to allow multiple arguments
parent
954dc9bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-astakos-app/astakos/im/management/commands/project-control.py
View file @
d2e16c8d
...
...
@@ -109,14 +109,14 @@ class Command(BaseCommand):
if
options
[
'terminate_expired'
]:
self
.
expire
(
execute
=
True
)
@
cmd_project_transaction_context
(
sync
=
True
)
def
run_command
(
self
,
func
,
id
,
ctx
=
None
)
:
try
:
func
(
id
)
except
BaseException
as
e
:
if
ctx
:
ctx
.
mark_rollback
()
raise
CommandError
(
e
)
def
run_command
(
self
,
func
,
*
args
):
with
cmd_project_transaction_context
(
sync
=
True
)
as
ctx
:
try
:
func
(
*
args
)
except
BaseException
as
e
:
if
ctx
:
ctx
.
mark_rollback
()
raise
CommandError
(
e
)
def
print_expired
(
self
,
projects
,
execute
):
length
=
len
(
projects
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment