Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
utils
Manage
Activity
Members
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ammsml
utils
Commits
452f7cf9
Commit
452f7cf9
authored
5 years ago
by
Christof Schulze
Browse files
Options
Downloads
Patches
Plain Diff
some clean ups
parent
8ca0f349
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
display.py
+3
-3
3 additions, 3 deletions
display.py
with
3 additions
and
3 deletions
display.py
+
3
−
3
View file @
452f7cf9
...
...
@@ -57,7 +57,7 @@ if getattr(C, 'DEFAULT_LOG_PATH'):
for
handler
in
logging
.
root
.
handlers
:
handler
.
addFilter
(
FilterBlackList
(
getattr
(
C
,
'
DEFAULT_LOG_FILTER
'
,
[])))
else
:
print
(
"
[WARNING]: log file at %s is not writeable and we cannot create it, aborting
\n
"
%
path
,
file
=
sys
.
stderr
)
print
(
"
[WARNING]: log file at
'
%s
'
is not writeable and we cannot create it, abort
logg
ing
.
\n
"
%
path
,
file
=
sys
.
stderr
)
# map color to log levels
...
...
@@ -198,7 +198,7 @@ class Display(with_metaclass(Singleton, object)):
self
.
display
(
"
%6d %0.5f [%s]: %s
"
%
(
os
.
getpid
(),
time
.
time
(),
host
,
msg
),
color
=
C
.
COLOR_DEBUG
)
def
verbose
(
self
,
msg
,
host
=
None
,
caplevel
=
2
):
"""
"""
to_stderr
=
C
.
VERBOSE_TO_STDERR
if
self
.
verbosity
>
caplevel
:
if
host
is
None
:
...
...
@@ -333,4 +333,4 @@ class Display(with_metaclass(Singleton, object)):
tty_size
=
unpack
(
'
HHHH
'
,
fcntl
.
ioctl
(
0
,
TIOCGWINSZ
,
pack
(
'
HHHH
'
,
0
,
0
,
0
,
0
)))[
1
]
else
:
tty_size
=
0
self
.
columns
=
max
(
79
,
tty_size
-
1
)
\ No newline at end of file
self
.
columns
=
max
(
79
,
tty_size
-
1
)
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