Commit 4d4b1fc3 authored by Gary Wong's avatar Gary Wong

Censor opinions about Python syntax.

parent 1dd100ff
......@@ -153,7 +153,7 @@ sys.stdout.flush()
params = {}
params["slice_urn"] = SLICEURN
params["credentials"] = (sliver,)
while True: # #@(%ing Python doesn't have do loops
while True:
rval,response = do_method("cm", "SliverStatus", params, quiet=True, version="2.0")
if rval:
sys.stdout.write( "*" )
......@@ -162,8 +162,7 @@ while True: # #@(%ing Python doesn't have do loops
elif response[ "value" ][ "status" ] == "ready":
break
elif response[ "value" ][ "status" ] == "changing" or response[ "value" ][ "status" ] == "mixed":
sys.stdout.write( "." ) # #@(%ing stupid Python #@(%s up the
# whitespace if you try "print"
sys.stdout.write( "." )
sys.stdout.flush()
time.sleep( 3 )
else:
......
......@@ -82,8 +82,6 @@ def is_urn( u ):
val == 0x7E ): urn += chr( val )
else: urn += '%' + m.group( 2 )
u = m.group( 3 )
# this is only so $#&*(#%ing ugly because Python does not know
# that assignments are expressions
m = re.match( "([^%]*)%([0-9A-Fa-f]{2})(.*)", u )
urn += u
......
......@@ -34,7 +34,7 @@ if os.path.exists( PASSPHRASEFILE ):
Fatal( "A passphrase has already been stored." )
from M2Crypto.util import passphrase_callback
while True: # #!(%ing Python doesn't have do loops
while True:
passphrase = passphrase_callback(0)
if not os.path.exists(CERTIFICATE):
print >> sys.stderr, "Warning:", CERTIFICATE, "not found; cannot " \
......
......@@ -118,7 +118,6 @@ def ShowCredential( cred, level ):
except Exception:
return
# Pretend Python has better tail recursion support than it really does.
ShowCredential( Lookup( parent, "credential" ), level + 1 )
if len( sys.argv ) > 2:
......
......@@ -162,7 +162,6 @@ def PassPhraseCB(v, prompt1='Enter passphrase:', prompt2='Verify passphrase:'):
else:
if debug:
print 'passphrase file %s does not exist' % (PASSPHRASEFILE)
# %.(&ing Python doesn't have static variables. So we jump through hoops.
if not "passphrase" in dir( PassPhraseCB ):
# Prompt user if PASSPHRASEFILE does not exist or could not be read.
from M2Crypto.util import passphrase_callback
......@@ -180,7 +179,6 @@ def geni_am_response_handler(method, method_args):
def dotty():
counter = 0
while threading.currentThread().keep_going:
# #@(%ing stupid Python #@(%s up the whitespace if you try "print"
sys.stderr.write( ( "/-\\|"[ counter ] ) + "\010" )
counter = ( counter + 1 ) & 3
sys.stderr.flush()
......
......@@ -70,7 +70,7 @@ if debug:
params = {}
params["slice_urn"] = SLICEURN
params["credentials"] = (slivercred,)
while True: # #@(%ing Python doesn't have do loops
while True:
rval,response = do_method("cm", "SliverStatus", params, version="2.0")
if rval:
Fatal("Could not get sliver status")
......
Markdown is supported
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