Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Managetests
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Managetests
Commits
ce74aa90
Commit
ce74aa90
authored
Mar 02, 2019
by
Mattia Rizzolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make possible to start without a details.json file
Signed-off-by:
Mattia Rizzolo
<
mattia@debian.org
>
parent
1c3a6d1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
managetests/utils.py
managetests/utils.py
+14
-7
No files found.
managetests/utils.py
View file @
ce74aa90
...
@@ -58,12 +58,19 @@ def is_root_valid(path):
...
@@ -58,12 +58,19 @@ def is_root_valid(path):
print
(
'There is a branches file conflicting with the expected directory'
)
print
(
'There is a branches file conflicting with the expected directory'
)
return
False
return
False
# TODO make possible to start without these two files
# details.json file
required_files
=
[
"config.json"
,
"details.json"
]
file
=
path
/
'details.json'
for
file
in
required_files
:
if
not
file
.
exists
():
file
=
path
/
file
with
open
(
file
,
'w'
)
as
f
:
if
not
(
file
.
exists
()
and
file
.
is_file
()):
f
.
write
(
'{"branches":{}}'
)
print
(
"The required file %s does not exist"
%
file
)
elif
not
file
.
is_file
():
return
False
print
(
'There is a details.json non-file conflicting with the expectations.'
)
return
False
# TODO make possible to start without this file
file
=
path
/
'config.json'
if
not
(
file
.
exists
()
and
file
.
is_file
()):
print
(
"The required file %s does not exist"
%
file
)
return
False
return
True
return
True
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