5ce4f416a94dc27834d4866ca924d86e002d506c,check_file.py,,main,#,21

Before Change


      print ("[-] " + filename + " access denied")
      exit(0)
  else:
    print ("[-] Usage: " + str(sys.argv[0]) + " <filename>") // Print usage if not all parameters passed/Checked
    exit(0)
  print ("[+] Reading from : " + filename)	// Display Message and read the file contents
  readfile(filename)

After Change


      for filename in filenames: 				// Iterate for each filename passed in command line argument
          if not os.path.isfile(filename):			// Check the File exists
              print ("[-] " + filename + " does not exist.")    
              filenames.remove(filename)			//remove non existing files from filenames list
              continue
              
          if not os.access(filename, os.R_OK):	// Check you can read the file
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: geekcomputers/Python
Commit Name: 5ce4f416a94dc27834d4866ca924d86e002d506c
Time: 2016-08-26
Author: 14bcs010@smvdu.ac.in
File Name: check_file.py
Class Name:
Method Name: main


Project Name: nilmtk/nilmtk
Commit Name: 8cbf44bc80b89c870e45403a50c1797206cfd074
Time: 2014-06-23
Author: oliparson@gmail.com
File Name: nilmtk/dataset_converters/wikienergy.py
Class Name: WikiEnergy
Method Name: download_dataset


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 3ad234f30b3958752df3060b3e8ab751bffeec6c
Time: 2018-11-19
Author: contact@againstthecurrent.ch
File Name: category_encoders/hashing.py
Class Name: HashingEncoder
Method Name: fit