Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vl-dcc
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
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
vaclab
vl-dcc
Commits
f90264d5
Commit
f90264d5
authored
4 years ago
by
Rolf Niepraschk
Browse files
Options
Downloads
Patches
Plain Diff
...
parent
bd6d584e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pretty_c14n.py
+6
-6
6 additions, 6 deletions
pretty_c14n.py
trans.py
+0
-1
0 additions, 1 deletion
trans.py
with
6 additions
and
7 deletions
pretty_c14n.py
+
6
−
6
View file @
f90264d5
...
...
@@ -3,14 +3,14 @@
import
sys
from
trans
import
pretty_c14n
def
error_
and_
exit
(
x
):
def
error_exit
(
x
):
print
(
'
ERROR:
'
,
str
(
x
),
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
if
len
(
sys
.
argv
)
<
3
:
error_
and_
exit
(
'
too few arguments
'
)
error_exit
(
'
too few arguments
'
)
if
sys
.
argv
[
1
]
==
sys
.
argv
[
2
]:
error_
and_
exit
(
'"
infile
"
and
"
outfile
"
must be different
'
)
error_exit
(
'"
infile
"
and
"
outfile
"
must be different
'
)
infile
=
sys
.
argv
[
1
]
outfile
=
sys
.
argv
[
2
]
...
...
@@ -21,12 +21,12 @@ try:
with
open
(
outfile
,
'
w
'
)
as
f2
:
err
,
xml
=
pretty_c14n
(
xml
)
if
err
:
error_
and_
exit
(
xml
)
error_exit
(
xml
)
f2
.
write
(
xml
)
except
Exception
as
error
:
error_
and_
exit
(
error
)
error_exit
(
error
)
print
(
'
\n
File »
'
+
infile
+
'
« was successfully canonized to file »
'
+
\
print
(
'
\n
File »
'
+
infile
+
'
« was successfully canoni
cali
zed to file »
'
+
\
outfile
+
'
«
\n
'
)
sys
.
exit
(
0
)
This diff is collapsed.
Click to expand it.
trans.py
+
0
−
1
View file @
f90264d5
...
...
@@ -39,7 +39,6 @@ def cert_to_xml(cert_doc):
err
,
xml
=
pretty_c14n
(
xml
)
if
err
:
xml
=
'
<error>
'
+
xml
+
'
</error>
\n
'
except
Exception
as
error
:
xml
=
'
<error>
'
+
str
(
error
)
+
'
</error>
\n
'
...
...
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