Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
61376e1e
Commit
61376e1e
authored
4 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
normalize-usercode: print fname before starting work
parent
07d2f6be
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
devtools/code-tools/normalize-usercode.py
+5
-3
5 additions, 3 deletions
devtools/code-tools/normalize-usercode.py
with
5 additions
and
3 deletions
devtools/code-tools/normalize-usercode.py
+
5
−
3
View file @
61376e1e
...
...
@@ -20,6 +20,8 @@ def normalize_text(ti, fname):
def
normalize_file
(
fname
,
inplace
):
try
:
print
(
f
'
FILE
{
fname
}
:
'
)
# read file, normalize
with
open
(
fname
,
'
r
'
)
as
f
:
ti
=
f
.
read
()
...
...
@@ -34,18 +36,18 @@ def normalize_file(fname, inplace):
f
.
write
(
t
)
with
open
(
"
out2.py
"
,
'
w
'
)
as
f
:
f
.
write
(
t2
)
exit
(
f
'
FILE
{
fname
}
:
BUG - changes under second normalization, see files out1.py and out2.py
'
)
exit
(
f
'
=>
BUG - changes under second normalization, see files out1.py and out2.py
'
)
# output
if
inplace
:
with
open
(
fname
,
'
w
'
)
as
f
:
f
.
write
(
t
)
print
(
f
'
FILE
{
fname
}
:
NORMALIZED
'
)
print
(
f
'
=>
NORMALIZED
'
)
else
:
print
(
t
)
return
1
except
Exception
as
e
:
print
(
f
'
FILE
{
fname
}
:
FAILED -
{
e
}
'
)
print
(
f
'
=>
FAILED -
{
e
}
'
)
return
2
...
...
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