Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
8edddb11
Commit
8edddb11
authored
Oct 30, 2009
by
Gary Wong
Browse files
Emulate a conditional expression the hard way, for compatibility with
Python 2.4.
parent
627660da
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/test/showcredential.py
View file @
8edddb11
...
...
@@ -125,8 +125,12 @@ if len( sys.argv ) > 2:
print
"usage: "
+
sys
.
argv
[
0
]
+
" [filename]"
sys
.
exit
(
1
)
doc
=
xml
.
dom
.
minidom
.
parse
(
sys
.
argv
[
1
]
if
len
(
sys
.
argv
)
>
1
else
sys
.
stdin
)
if
len
(
sys
.
argv
)
>
1
:
docsrc
=
sys
.
argv
[
1
]
else
:
docsrc
=
sys
.
stdin
doc
=
xml
.
dom
.
minidom
.
parse
(
docsrc
)
scred
=
Lookup
(
doc
,
"signed-credential"
)
cred
=
Lookup
(
scred
,
"credential"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment