Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-image-creator
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
itminedu
snf-image-creator
Commits
710adfb2
Commit
710adfb2
authored
13 years ago
by
Nikos Skalkotos
Browse files
Options
Downloads
Patches
Plain Diff
Print an extra space when new_line=False
parent
96171db1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
image_creator/output.py
+5
-5
5 additions, 5 deletions
image_creator/output.py
with
5 additions
and
5 deletions
image_creator/output.py
+
5
−
5
View file @
710adfb2
...
...
@@ -37,7 +37,7 @@ from colors import red, green, yellow
def
error
(
msg
,
new_line
=
True
,
color
=
True
):
nl
=
"
\n
"
if
new_line
else
''
nl
=
"
\n
"
if
new_line
else
'
'
if
color
:
sys
.
stderr
.
write
(
red
(
'
Error: %s
'
%
msg
)
+
nl
)
else
:
...
...
@@ -45,7 +45,7 @@ def error(msg, new_line=True, color=True):
def
warn
(
msg
,
new_line
=
True
,
color
=
True
):
nl
=
"
\n
"
if
new_line
else
''
nl
=
"
\n
"
if
new_line
else
'
'
if
color
:
sys
.
stderr
.
write
(
yellow
(
"
Warning: %s
"
%
msg
)
+
nl
)
else
:
...
...
@@ -53,7 +53,7 @@ def warn(msg, new_line=True, color=True):
def
success
(
msg
,
new_line
=
True
,
color
=
True
):
nl
=
"
\n
"
if
new_line
else
''
nl
=
"
\n
"
if
new_line
else
'
'
if
color
:
sys
.
stdout
.
write
(
green
(
msg
)
+
nl
)
else
:
...
...
@@ -63,7 +63,7 @@ def success(msg, new_line=True, color=True):
def
output
(
msg
=
''
,
new_line
=
True
):
nl
=
"
\n
"
if
new_line
else
''
nl
=
"
\n
"
if
new_line
else
'
'
sys
.
stdout
.
write
(
msg
+
nl
)
if
not
nl
:
sys
.
stdout
.
flush
()
...
...
@@ -155,7 +155,7 @@ class Output_wth_progress(Output_wth_colors):
self
.
goto
(
1
)
def
success
(
self
,
result
):
self
.
output
.
output
(
"
\r
%s...
\033
[K
"
%
self
.
title
,
False
)
self
.
output
.
output
(
"
\r
%s...
\033
[K
"
%
self
.
title
,
False
)
self
.
output
.
success
(
result
)
...
...
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