Commit 8edddb11 authored by Gary Wong's avatar Gary Wong
Browse files

Emulate a conditional expression the hard way, for compatibility with

Python 2.4.
parent 627660da
......@@ -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" )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment