def openFile(filename, mode='r', encoding=UNICODE_ENCODING, errors='replace', buffering=1):
 try:
  return codecs.open(filename, mode, encoding, errors, buffering)
 except IOError:
  errMsg = ("there has been a file opening error for filename '%s'. " % filename)
  errMsg += ('Please check %s permissions on a file ' % ('write' if (mode and (('w' in mode) or ('a' in mode) or ('+' in mode))) else 'read'))
  errMsg += "and that it's not locked by another process."
  raise SqlmapSystemException(errMsg)

def openFile ( filename , mode = 'r' , encoding = UNICODE_ENCODING , errors = 'replace' , buffering = 1 ) : try : return codecs . open ( filename , mode , encoding , errors , buffering ) except IOError : errMsg = ( "there has been a file opening error for filename '%s'. " % filename ) errMsg += ( 'Please check %s permissions on a file ' % ( 'write' if ( mode and ( ( 'w' in mode ) or ( 'a' in mode ) or ( '+' in mode ) ) ) else 'read' ) ) errMsg += "and that it's not locked by another process." raise SqlmapSystemException ( errMsg )
returns file handle of a given filename .