Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
1dd18017
Commit
1dd18017
authored
7 years ago
by
Florent Thiery
Browse files
Options
Downloads
Patches
Plain Diff
limit to 1 depth, refs
#21677
parent
f6cd0f7f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_backup.py
+6
-5
6 additions, 5 deletions
tests/test_backup.py
with
6 additions
and
5 deletions
tests/test_backup.py
+
6
−
5
View file @
1dd18017
...
@@ -67,7 +67,7 @@ def test_backup_space(server):
...
@@ -67,7 +67,7 @@ def test_backup_space(server):
return
False
return
False
def
check_local_backup
(
path
):
def
check_local_backup
(
path
,
descend
=
True
):
all_ok
=
True
all_ok
=
True
for
d
in
os
.
listdir
(
path
):
for
d
in
os
.
listdir
(
path
):
subd
=
os
.
path
.
join
(
path
,
d
)
subd
=
os
.
path
.
join
(
path
,
d
)
...
@@ -85,10 +85,11 @@ def check_local_backup(path):
...
@@ -85,10 +85,11 @@ def check_local_backup(path):
else
:
else
:
print
(
'
Backup %s is fine
'
%
subd
)
print
(
'
Backup %s is fine
'
%
subd
)
else
:
else
:
for
dd
in
os
.
listdir
(
subd
):
if
descend
:
subsubd
=
os
.
path
.
join
(
subd
,
dd
)
for
dd
in
os
.
listdir
(
subd
):
if
os
.
path
.
isdir
(
subsubd
):
subsubd
=
os
.
path
.
join
(
subd
,
dd
)
all_ok
=
min
(
all_ok
,
check_local_backup
(
subsubd
))
if
os
.
path
.
isdir
(
subsubd
):
all_ok
=
min
(
all_ok
,
check_local_backup
(
subsubd
,
descend
=
False
))
return
all_ok
return
all_ok
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment