Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fuss-manager
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
32
Issues
32
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
FUSS
fuss-manager
Commits
ba270780
Commit
ba270780
authored
Aug 11, 2020
by
Elena Grandi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create the directory for a JsonableLog before trying to write it
parent
99573a3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
manager/manager.py
manager/manager.py
+1
-0
tests/test_operationlog.py
tests/test_operationlog.py
+1
-1
No files found.
manager/manager.py
View file @
ba270780
...
...
@@ -16,6 +16,7 @@ class JsonableLog:
"""
def
__init__
(
self
,
pathname
):
self
.
pathname
=
pathname
os
.
makedirs
(
os
.
path
.
dirname
(
self
.
pathname
),
exist_ok
=
True
)
try
:
self
.
fd
=
open
(
self
.
pathname
,
"at"
)
except
FileNotFoundError
:
...
...
tests/test_operationlog.py
View file @
ba270780
...
...
@@ -48,4 +48,4 @@ class TestOperationLog(TestCase):
oplog
.
log
(
ops
.
Noop
())
oplog
.
close
()
self
.
assert
Fals
e
(
os
.
path
.
exists
(
pathname
))
self
.
assert
Tru
e
(
os
.
path
.
exists
(
pathname
))
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