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
71ee1c11
Verified
Commit
71ee1c11
authored
Mar 06, 2019
by
Lorenz Steinert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow relpath in for share and path dir
parent
518d9387
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
bin/module/esme.py
bin/module/esme.py
+12
-4
No files found.
bin/module/esme.py
View file @
71ee1c11
...
...
@@ -323,9 +323,13 @@ def get_share(rundir, config=None, sharedir=None):
logging
.
warning
(
sharedir
+
': Not a Directory'
)
return
Error
.
NO_DIR
elif
config
:
if
os
.
path
.
isdir
(
config
[
'PROTOKOLL'
][
'share'
]):
config_share
=
config
[
'PROTOKOLL'
][
'share'
]
if
os
.
path
.
isdir
(
config_share
)
and
os
.
path
.
isabs
(
config_share
):
return
config
[
'PROTOKOLL'
][
'share'
]
logging
.
warning
(
config
[
'PROTOKOLL'
][
'share'
]
+
': Not a Directory'
)
elif
os
.
path
.
isdir
(
os
.
path
.
join
(
rundir
,
'..'
,
config_share
)):
print
(
os
.
path
.
normpath
(
os
.
path
.
join
(
rundir
,
'..'
,
config_share
)))
return
os
.
path
.
normpath
(
os
.
path
.
join
(
rundir
,
'..'
,
config_share
))
logging
.
warning
(
config_share
+
': Not a Directory'
)
return
Error
.
NO_DIR
elif
os
.
path
.
isdir
(
os
.
path
.
join
(
rundir
,
'../share'
)):
return
os
.
path
.
join
(
rundir
,
'../share'
)
...
...
@@ -342,8 +346,12 @@ def get_path(rundir, config=None, path=None):
logging
.
warning
(
path
+
': Not a Directory'
)
return
Error
.
NO_DIR
elif
config
:
if
os
.
path
.
isdir
(
config
[
'PROTOKOLL'
][
'path'
]):
return
config
[
'PROTOKOLL'
][
'path'
]
config_path
=
config
[
'PROTOKOLL'
][
'path'
]
if
os
.
path
.
isdir
(
config_path
)
and
os
.
path
.
isabs
(
config_path
):
return
config_path
elif
os
.
path
.
isdir
(
os
.
path
.
join
(
rundir
,
'..'
,
config_path
)):
print
(
os
.
path
.
normpath
(
os
.
path
.
join
(
rundir
,
'..'
,
config_path
)))
return
os
.
path
.
normpath
(
os
.
path
.
join
(
rundir
,
'..'
,
config_path
))
logging
.
warning
(
config
[
'PROTOKOLL'
][
'path'
]
+
': Not a Directory'
)
return
Error
.
NO_DIR
elif
os
.
path
.
isdir
(
os
.
path
.
join
(
rundir
,
'../..'
)):
...
...
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