Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
coco
Commits
536d4dbd
Commit
536d4dbd
authored
7 years ago
by
liuzheng712
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: logging and style update
parent
74e8c91e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
logger.py
coco/logger.py
+0
-0
record.py
coco/record.py
+3
-6
No files found.
coco/logg
ing
.py
→
coco/logg
er
.py
View file @
536d4dbd
File moved
This diff is collapsed.
Click to expand it.
coco/record.py
View file @
536d4dbd
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
import
abc
import
abc
import
logging
import
logging
logger
=
logging
.
getLogger
(
__file__
)
logger
=
logging
.
getLogger
(
__file__
)
BUF_SIZE
=
1024
BUF_SIZE
=
1024
...
@@ -14,7 +13,6 @@ END_SENTINEL = object()
...
@@ -14,7 +13,6 @@ END_SENTINEL = object()
class
ReplayRecorder
(
metaclass
=
abc
.
ABCMeta
):
class
ReplayRecorder
(
metaclass
=
abc
.
ABCMeta
):
def
__init__
(
self
,
app
):
def
__init__
(
self
,
app
):
self
.
app
=
app
self
.
app
=
app
...
@@ -35,11 +33,12 @@ class ReplayRecorder(metaclass=abc.ABCMeta):
...
@@ -35,11 +33,12 @@ class ReplayRecorder(metaclass=abc.ABCMeta):
self
.
session_end
(
data
[
"session"
])
self
.
session_end
(
data
[
"session"
])
@abc.abstractmethod
@abc.abstractmethod
def
session_end
(
self
,
session_id
):
def
session_start
(
self
,
session_id
):
print
(
"Session start"
)
pass
pass
@abc.abstractmethod
@abc.abstractmethod
def
session_
start
(
self
,
session_id
):
def
session_
end
(
self
,
session_id
):
pass
pass
...
@@ -74,7 +73,6 @@ class CommandRecorder(metaclass=abc.ABCMeta):
...
@@ -74,7 +73,6 @@ class CommandRecorder(metaclass=abc.ABCMeta):
class
ServerReplayRecorder
(
ReplayRecorder
):
class
ServerReplayRecorder
(
ReplayRecorder
):
def
record_replay
(
self
,
data_set
):
def
record_replay
(
self
,
data_set
):
"""
"""
:param data_set:
:param data_set:
...
@@ -91,7 +89,6 @@ class ServerReplayRecorder(ReplayRecorder):
...
@@ -91,7 +89,6 @@ class ServerReplayRecorder(ReplayRecorder):
class
ServerCommandRecorder
(
CommandRecorder
):
class
ServerCommandRecorder
(
CommandRecorder
):
def
record_command
(
self
,
data_set
):
def
record_command
(
self
,
data_set
):
if
not
data_set
:
if
not
data_set
:
return
True
return
True
...
...
This diff is collapsed.
Click to expand it.
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