Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Fachschaftsrat Physik TUKL
Protokoll
protokoll_skript
Commits
fac6f962
Commit
fac6f962
authored
Aug 05, 2018
by
Lorenz Steinert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed some indention errors and fixed get_protokollant_ldap
parent
cd07fe93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
bin/module/esme.py
bin/module/esme.py
+6
-8
No files found.
bin/module/esme.py
View file @
fac6f962
...
...
@@ -69,13 +69,11 @@ class FsrLdap:
"""search the LDAP for the current user"""
logging
.
info
(
"Fetching Protokollant from LDAP ..."
)
try
:
conn
=
ldap
.
Connection
(
self
.
server
)
conn
.
bind
()
fil
=
"(uid="
+
current_user
()
+
")"
if
conn
.
search
(
'ou=people,'
+
self
.
base
,
fil
,
attributes
=
[
'displayName'
]):
if
self
.
conn
.
search
(
'ou=people,'
+
self
.
base
,
fil
,
attributes
=
[
'displayName'
]):
logging
.
info
(
"Done"
)
return
" "
.
join
(
str
(
conn
.
entries
[
0
][
'displayName'
]).
split
(
", "
)[::
-
1
])
return
" "
.
join
(
str
(
self
.
conn
.
entries
[
0
][
'displayName'
]).
split
(
", "
)[::
-
1
])
return
get_protokollant
(
config
)
except
ldap
.
core
.
exceptions
.
LDAPException
as
error_message
:
if
self
.
debug
:
...
...
@@ -262,8 +260,8 @@ def get_config(rundir, config_path=None, default=False):
config
.
read
(
os
.
path
.
join
(
rundir
,
'../etc/proto.ini.default'
))
return
config
logging
.
warning
(
'No default File found at '
+
os
.
path
.
abspath
(
os
.
path
.
join
(
rundir
,
'../etc/proto.ini.default'
)))
+
os
.
path
.
abspath
(
os
.
path
.
join
(
rundir
,
'../etc/proto.ini.default'
)))
sys
.
exit
(
1
)
elif
os
.
path
.
isfile
(
os
.
path
.
join
(
rundir
,
'../etc/proto.ini'
))
and
not
default
:
...
...
@@ -294,7 +292,7 @@ def get_share(rundir, config=None, sharedir=None):
elif
os
.
path
.
isdir
(
os
.
path
.
join
(
rundir
,
'../share'
)):
return
os
.
path
.
join
(
rundir
,
'../share'
)
logging
.
warning
(
'No share Directory found at '
+
os
.
path
.
abspath
(
os
.
path
.
join
(
rundir
,
'../share'
)))
+
os
.
path
.
abspath
(
os
.
path
.
join
(
rundir
,
'../share'
)))
sys
.
exit
(
1
)
...
...
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