def validate_optional_args(args):
 optional_args = {'json': ('json/simplejson python module', json), 'secure': ('SSL support', HTTPSConnection)}
 for (arg, info) in optional_args.items():
  if (getattr(args, arg, False) and (info[1] is None)):
   raise SystemExit(('%s is not installed. --%s is unavailable' % (info[0], arg)))

def validate_optional_args ( args ) : optional_args = { 'json' : ( 'json/simplejson python module' , json ) , 'secure' : ( 'SSL support' , HTTPSConnection ) } for ( arg , info ) in optional_args . items ( ) : if ( getattr ( args , arg , False ) and ( info [ 1 ] is None ) ) : raise SystemExit ( ( '%s is not installed. --%s is unavailable' % ( info [ 0 ] , arg ) ) )
check if an argument was provided that depends on a module that may not be part of the python standard library .