Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OSUG
RESIF
resif_data_reporter
Commits
33a4fafe
Commit
33a4fafe
authored
Jun 23, 2020
by
Jonathan Schaeffer
Browse files
Passage en bynet
parent
85c310c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
resifdatareporter/resifdatareporter.py
View file @
33a4fafe
...
...
@@ -47,7 +47,7 @@ def scan_volume(path):
[
"du"
,
"--exclude"
,
".snapshot"
,
"-b"
,
"-d4"
,
volume
]).
decode
(
"utf-8"
).
splitlines
()
logger
.
debug
(
"Volume scanned in %s"
,
datetime
.
now
()
-
starttime
)
for
l
in
lines
:
logger
.
debug
(
l
)
logger
.
debug
(
"Scanning %s"
,
l
)
(
size
,
path
)
=
l
.
split
(
'
\t
'
)
# On ne garde que le chemin qui nous intéresse
path
=
path
.
replace
(
volume
,
''
).
split
(
'/'
)
...
...
@@ -55,8 +55,9 @@ def scan_volume(path):
if
len
(
path
)
==
4
:
logger
.
debug
(
"path: %s, size: %s"
,
path
,
size
)
(
channel
,
quality
)
=
path
[
3
].
split
(
'.'
)
data
.
append
({
'year'
:
path
[
0
],
'network'
:
path
[
1
],
'station'
:
path
[
2
],
data
.
append
({
'year'
:
path
[
1
],
'network'
:
path
[
0
],
'station'
:
path
[
2
],
'channel'
:
channel
,
'quality'
:
quality
,
'size'
:
size
})
logger
.
debug
(
data
[
-
1
])
return
data
...
...
Write
Preview
Supports
Markdown
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