Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Debian New Member Process
nm.debian.org
Commits
45d6333b
Commit
45d6333b
authored
Aug 02, 2017
by
Enrico Zini
Browse files
Maintenance runs on my laptop
parent
c5a29e9e
Changes
5
Hide whitespace changes
Inline
Side-by-side
backend/utils.py
View file @
45d6333b
...
...
@@ -109,7 +109,7 @@ class StreamStdoutKeepStderr(object):
else
:
last_line
=
l
elif
tag
==
"E"
:
self
.
stderr
.
write
(
str
(
buf
)
)
self
.
stderr
.
write
(
buf
)
if
last_line
is
not
None
:
yield
last_line
...
...
dsa/housekeeping.py
View file @
45d6333b
...
...
@@ -14,11 +14,6 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
django_housekeeping
as
hk
from
django.db
import
transaction
from
backend.housekeeping
import
MakeLink
,
Housekeeper
...
...
dsa/models.py
View file @
45d6333b
"""
Code used to access Debian's LDAP
"""
from
django.db
import
models
from
django.conf
import
settings
try
:
import
ldap
except
ImportError
:
import
ldap3
as
ldap
import
ldap3
LDAP_SERVER
=
getattr
(
settings
,
"LDAP_SERVER"
,
"ldap://db.debian.org"
)
...
...
@@ -17,13 +13,13 @@ class Entry(object):
self
.
attrs
=
None
self
.
uid
=
None
def
init
(
self
,
dn
,
at
tr
s
):
def
init
(
self
,
en
tr
y
):
"""
Init entry to point at these attributes
"""
self
.
dn
=
dn
self
.
attrs
=
at
tr
s
self
.
uid
=
at
tr
s
[
"uid"
][
0
]
self
.
dn
=
entry
.
entry_get_dn
()
self
.
attrs
=
en
tr
y
self
.
uid
=
en
tr
y
[
"uid"
][
0
]
def
single
(
self
,
name
):
"""
...
...
@@ -45,11 +41,10 @@ class Entry(object):
return
"guest"
in
self
.
attrs
[
"supplementaryGid"
]
def
list_people
():
search_base
=
"dc=debian,dc=org"
l
=
ldap
.
initialize
(
LDAP_SERVER
)
l
.
simple_bind_s
(
""
,
""
)
conn
=
ldap3
.
Connection
(
LDAP_SERVER
,
auto_bind
=
True
)
conn
.
search
(
"dc=debian,dc=org"
,
"(objectclass=inetOrgPerson)"
,
ldap3
.
SUBTREE
,
attributes
=
ldap3
.
ALL_ATTRIBUTES
)
# Create the object only once
entry
=
Entry
()
for
dn
,
attrs
in
l
.
search_s
(
search_base
,
ldap
.
SCOPE_SUBTREE
,
"objectclass=inetOrgPerson"
)
:
entry
.
init
(
dn
,
attrs
)
for
e
in
conn
.
entries
:
entry
.
init
(
e
)
yield
entry
keyring/git.py
View file @
45d6333b
...
...
@@ -71,8 +71,8 @@ class LogEntry(object):
if
self
.
re_update_changelog
.
match
(
subject
):
return
None
if
self
.
re_import_changes
.
match
(
subject
):
return
None
if
body
.
startswith
(
"Action:"
):
operation
=
email
.
message_from_string
(
body
.
encode
(
"utf-8"
)
)
return
dict
(
list
(
operation
.
items
())
)
operation
=
email
.
message_from_string
(
body
)
return
dict
(
operation
.
items
())
else
:
for
match
in
self
.
re_summaries
:
mo
=
match
[
"re"
].
match
(
subject
)
...
...
keyring/git_ops.py
View file @
45d6333b
...
...
@@ -185,7 +185,7 @@ class Add(RoleOperation):
This is better than nothing, but not a lot better than that.
"""
# See http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
fn
=
subject
.
decode
(
'utf8'
).
split
()
fn
=
subject
.
split
()
if
len
(
fn
)
==
1
:
return
fn
[
0
],
""
,
""
elif
len
(
fn
)
==
2
:
...
...
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