Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
2bf97e0f
Commit
2bf97e0f
authored
5 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
use buffered stdout in compare-structures
parent
9f5e4bf0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
actions/ost-compare-structures
+1
-15
1 addition, 15 deletions
actions/ost-compare-structures
with
1 addition
and
15 deletions
actions/ost-compare-structures
+
1
−
15
View file @
2bf97e0f
...
...
@@ -989,20 +989,6 @@ def _Main():
with open(opts.output, "w") as outfile:
json.dump(result, outfile, indent=4, sort_keys=True)
class _Unbuffered(object):
# https://stackoverflow.com/questions/45263064/how-can-i-fix-this-valueerror-cant-have-unbuffered-text-i-o-in-python-3/45263101
def __init__(self, stream):
self.stream = stream
def write(self, data):
self.stream.write(data)
self.stream.flush()
def writelines(self, datas):
self.stream.writelines(datas)
self.stream.flush()
def __getattr__(self, attr):
return getattr(self.stream, attr)
if __name__ == '__main__':
# make script 'hot'
sys.stdout = _Unbuffered(sys.stdout)
_Main()
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