Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
1f9d2ed4
Commit
1f9d2ed4
authored
Jul 10, 2018
by
Guilhem Saurel
Browse files
robotpkg management command: only look for */{slug} and */py-{slug}
parent
4f37c7ba
Pipeline
#910
passed with stages
in 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/management/commands/robotpkg.py
View file @
1f9d2ed4
import
itertools
import
logging
from
django.conf
import
settings
...
...
@@ -20,7 +21,7 @@ class Command(BaseCommand):
for
project
in
Project
.
objects
.
all
():
for
slug
in
[
project
.
slug
,
project
.
slug
.
replace
(
'_'
,
'-'
)]:
for
pkg
in
path
.
glob
(
f
'*/*
{
slug
}
'
):
for
pkg
in
itertools
.
chain
(
path
.
glob
(
f
'*/
{
slug
}
'
),
path
.
glob
(
f
'*/py-
{
slug
}
'
)
)
:
obj
,
created
=
Robotpkg
.
objects
.
get_or_create
(
name
=
pkg
.
name
,
category
=
pkg
.
parent
.
name
,
project
=
project
)
if
created
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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