def will_write(fn):
 def _fn(*a, **kw):
  if disallow_db_writes:
   raise CassandraException('Not so fast! DB writes have been disabled')
  return fn(*a, **kw)
 return _fn

def will_write ( fn ) : def _fn ( * a , ** kw ) : if disallow_db_writes : raise CassandraException ( 'Not so fast! DB writes have been disabled' ) return fn ( * a , ** kw ) return _fn
decorator to indicate that a given function intends to write out to cassandra .