Skip to content

Low Priority Issues - GB2PR_PROJECT (100 issues) #4

@Ricky512227

Description

@Ricky512227

LOW Priority Bug Report for GB2PR_PROJECT

Date: 2025-12-23T23:00:12.738Z

Priority: P2
Severity: LOW
Total Issues: 100

1. WatchDog.py:16

Category: code_quality

Print statement found - should use proper logging

		logger.info("Constructed s3Path for [{0}] File Notification Message :: {1}".format(fileType,s3MessagePath))
		return s3MessagePath
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

#Check if file in s3 exists or not

2. WatchDog.py:35

Category: code_quality

Print statement found - should use proper logging

			logger.info("[{0}] File_NOT_Found ==> {1}".format(fileType, filePath))
			return False
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

#Check if object/directory in s3 exists or not
def isDirExistsInS3(fileType,objName):

3. WatchDog.py:53

Category: code_quality

Print statement found - should use proper logging

			logger.info("[{0}] S3_Object_Not_Found ==> {1}".format(fileType, objName))
			return False
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

def isSourcFileMessageExists(fileType, objPath,messageFileName):

4. WatchDog.py:68

Category: code_quality

Print statement found - should use proper logging

		else:
			return False
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

#Search the Controller, S3object and Message file arraived or not.
def searchControlNotificationMsgFile(fileType, objPath, messageFileName):

5. WatchDog.py:84

Category: code_quality

Print statement found - should use proper logging

		else:
			return False
	except Exception as ex:
		print("Error occurred :: {0}\tLine No :: {1}".format(ex, sys.exc_info()[2].tb_lineno))

#Search the Source, S3object and Message file arraived or not.
def searchSourceNotificationMsgFile(fileType, monitoringInterval,listOfSoruceMessageObjPaths,messageFileName):

6. WatchDog.py:98

Category: code_quality

Print statement found - should use proper logging

				time.sleep(10)
		#If the total Soruces Messages are not received then again begin the ticker.
		if sourceFileCounter != len(listOfSoruceMessageObjPaths):
			print (" Fetched Data and [Received Count vs Target Count] ==> {0} {1}".format(sourceFileCounter, len(listOfSoruceMessageObjPaths)))
			print("Sleeping for {0}secs".format(monitoringInterval))
			time.sleep(monitoringInterval)
			searchSourceNotificationMsgFile(fileType, monitoringInterval,listOfSoruceMessageObjPaths)

7. WatchDog.py:99

Category: code_quality

Print statement found - should use proper logging

		#If the total Soruces Messages are not received then again begin the ticker.
		if sourceFileCounter != len(listOfSoruceMessageObjPaths):
			print (" Fetched Data and [Received Count vs Target Count] ==> {0} {1}".format(sourceFileCounter, len(listOfSoruceMessageObjPaths)))
			print("Sleeping for {0}secs".format(monitoringInterval))
			time.sleep(monitoringInterval)
			searchSourceNotificationMsgFile(fileType, monitoringInterval,listOfSoruceMessageObjPaths)
			return True

8. WatchDog.py:104

Category: code_quality

Print statement found - should use proper logging

			searchSourceNotificationMsgFile(fileType, monitoringInterval,listOfSoruceMessageObjPaths)
			return True
		else:
			print ( "Fetched Data and [Received Count vs Target Count] ==> {0} {1}".format(sourceFileCounter, len(listOfSoruceMessageObjPaths)))
			return True
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

9. WatchDog.py:107

Category: code_quality

Print statement found - should use proper logging

			print ( "Fetched Data and [Received Count vs Target Count] ==> {0} {1}".format(sourceFileCounter, len(listOfSoruceMessageObjPaths)))
			return True
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))



10. feedProcessing.py:60

Category: code_quality

Print statement found - should use proper logging


				controlMessageObjPath = constructS3PathForNotificationMsg(controlType, monitoringBucketName,monitoringBucketRegionName,objPath1,objPath2,objPath3,targetDate,controllerId)
				listOfSoruceMessageObjPaths = [constructS3PathForNotificationMsg(sourceType,monitoringBucketName,monitoringBucketRegionName,objPath1,objPath2,objPath3,targetDate,sourceDataSetId) for sourceDataSetId in [refreshAsmtDataSetId,refreshDeedDataSetId,updateAsmtDataSetId,updateDeedDataSetId]]
				print ("Initiated search to fetch the Notification Messages ....")
				isAllMessageReceived = False
				while True:
					#Search the control file obj and its file based on the targertdate which was passed in sys args

11. feedProcessing.py:66

Category: code_quality

Print statement found - should use proper logging

					#Search the control file obj and its file based on the targertdate which was passed in sys args
					messageFileName = datetime.datetime.strptime(targetDate, '%Y-%m-%d').strftime('%Y%m%d')+"*.json"
					if not searchControlNotificationMsgFile(controlType,controlMessageObjPath,messageFileName):
						print("Sleeping for {0}secs".format(monitoringInterval))
						time.sleep(monitoringInterval)
					else:
						#Search the source objs and its files based on the targertdate which was passed in sys args

12. feedProcessing.py:72

Category: code_quality

Print statement found - should use proper logging

						#Search the source objs and its files based on the targertdate which was passed in sys args
						if searchSourceNotificationMsgFile(sourceType, monitoringInterval,listOfSoruceMessageObjPaths,messageFileName):
							isAllMessageReceived = True
							print ("All Messages are Arrived .... Stopping the Monitor...")
							break

				currentTimeStamp = datetime.datetime.today().strftime('%Y-%m-%d-%H-%M-%S')

13. feedProcessing.py:110

Category: code_quality

Print statement found - should use proper logging

					for notificationMessageS3Obj in listOfSoruceMessageObjPaths+controlMessageObjPath.split(","):
						notificationMessageS3FileName = datetime.datetime.strptime(targetDate, '%Y-%m-%d').strftime('%Y%m%d')+"*.json"
						notificationMessageS3FilePath = os.path.join(notificationMessageS3Obj,notificationMessageS3FileName)
						print ("Received notificationMessageS3Obj :: {0} :: {1}".format(notificationMessageS3Obj, type(notificationMessageS3Obj)))
						targetFileName = "NotificationMessage_"+notificationMessageS3Obj.split("/")[6]+".json"
						targetFielPath = os.path.join(downloadedNotificationMessageFilesBasePathWithCurrentDate,targetFileName)
						print("Received targetFielPath :: {0}".format(targetFielPath))

14. feedProcessing.py:113

Category: code_quality

Print statement found - should use proper logging

						print ("Received notificationMessageS3Obj :: {0} :: {1}".format(notificationMessageS3Obj, type(notificationMessageS3Obj)))
						targetFileName = "NotificationMessage_"+notificationMessageS3Obj.split("/")[6]+".json"
						targetFielPath = os.path.join(downloadedNotificationMessageFilesBasePathWithCurrentDate,targetFileName)
						print("Received targetFielPath :: {0}".format(targetFielPath))
						#Cmd to download the file to local from s3
						cmdToGetS3FileCopyToLocal = "hdfs dfs -copyToLocal"+" "+notificationMessageS3FilePath+" "+ targetFielPath
						returnCode, cmdData = executeCmd(cmdToGetS3FileCopyToLocal)

15. feedProcessing.py:141

Category: code_quality

Print statement found - should use proper logging

								targetLocation = downloadedControlFileBasePathWithCurrentDate+"/"
							else:
								targetLocation = downloadedSourceFilesBasePathWithCurrentDate+"/"
							print ("targetLocation :: {0}".format(targetLocation))
							#Copy file from s3 to local target path
							cmdToGetS3FileCopyToLocal = "hdfs dfs -copyToLocal"+" "+s3Url+" "+targetLocation
							returnCode, cmdData = executeCmd(cmdToGetS3FileCopyToLocal)

16. feedProcessing.py:204

Category: code_quality

Print statement found - should use proper logging

															feedName = "_".join(extractedDirNameSplit[0:2])
															feedType = extractedDirNameSplit[-1]
															currentFeedValidationDirName = os.path.join(extractedFileList[0],feedName,feedType)
															print("currentFeedValidationDirName :: {0}".format(currentFeedValidationDirName))
															print("#########################################################")
															feedRunner(currentFeedValidationDirName,downloadedSourceFilesBasePathWithCurrentDate)
															print("#########################################################")

17. feedProcessing.py:205

Category: code_quality

Print statement found - should use proper logging

															feedType = extractedDirNameSplit[-1]
															currentFeedValidationDirName = os.path.join(extractedFileList[0],feedName,feedType)
															print("currentFeedValidationDirName :: {0}".format(currentFeedValidationDirName))
															print("#########################################################")
															feedRunner(currentFeedValidationDirName,downloadedSourceFilesBasePathWithCurrentDate)
															print("#########################################################")
														else:

18. feedProcessing.py:207

Category: code_quality

Print statement found - should use proper logging

															print("currentFeedValidationDirName :: {0}".format(currentFeedValidationDirName))
															print("#########################################################")
															feedRunner(currentFeedValidationDirName,downloadedSourceFilesBasePathWithCurrentDate)
															print("#########################################################")
														else:
															print("Failed Extracted the .gz file:: {0}".format(eachGZfile))
															logger.info("Failed Extracted the .gz file:: {0}".format(eachGZfile))

19. feedProcessing.py:209

Category: code_quality

Print statement found - should use proper logging

															feedRunner(currentFeedValidationDirName,downloadedSourceFilesBasePathWithCurrentDate)
															print("#########################################################")
														else:
															print("Failed Extracted the .gz file:: {0}".format(eachGZfile))
															logger.info("Failed Extracted the .gz file:: {0}".format(eachGZfile))

									else:

20. feedProcessing.py:213

Category: code_quality

Print statement found - should use proper logging

															logger.info("Failed Extracted the .gz file:: {0}".format(eachGZfile))

									else:
										print ('No ZIP files found inside the Source Directory :: {0}'.format(downloadedSourceFilesBasePathWithCurrentDate))
										logger.error('No ZIP files found inside the Source Directory :: {0}'.format(downloadedSourceFilesBasePathWithCurrentDate))
								else:
									print ('No Data found inside the Control File :: {0}'.format(controlFilePath))

21. feedProcessing.py:216

Category: code_quality

Print statement found - should use proper logging

										print ('No ZIP files found inside the Source Directory :: {0}'.format(downloadedSourceFilesBasePathWithCurrentDate))
										logger.error('No ZIP files found inside the Source Directory :: {0}'.format(downloadedSourceFilesBasePathWithCurrentDate))
								else:
									print ('No Data found inside the Control File :: {0}'.format(controlFilePath))
									logger.error('No Data found inside the Control File :: {0}'.format(controlFilePath))
						else:
							print("Not all files downloaded/copied to local..")

22. feedProcessing.py:219

Category: code_quality

Print statement found - should use proper logging

									print ('No Data found inside the Control File :: {0}'.format(controlFilePath))
									logger.error('No Data found inside the Control File :: {0}'.format(controlFilePath))
						else:
							print("Not all files downloaded/copied to local..")
							logger.error("Not all files downloaded/copied to local..")
					else:
						print("Failed to collect the Notification Messages ..")

23. feedProcessing.py:222

Category: code_quality

Print statement found - should use proper logging

							print("Not all files downloaded/copied to local..")
							logger.error("Not all files downloaded/copied to local..")
					else:
						print("Failed to collect the Notification Messages ..")
						logger.error("Failed to collect the Notification Messages ..")
			else:
				print("InValid Date Format received :: {0}\n It should be [YYYY-MM-DD]".format(targetDate))

24. feedProcessing.py:225

Category: code_quality

Print statement found - should use proper logging

						print("Failed to collect the Notification Messages ..")
						logger.error("Failed to collect the Notification Messages ..")
			else:
				print("InValid Date Format received :: {0}\n It should be [YYYY-MM-DD]".format(targetDate))
		else:
			print("Received Invalid arguements ::{0}\n It shoudl be [python feedProcessing.py YYYY-MM-DD]".format(receivedArgs))
			logger.error("Received Invalid arguements ::{0}\n It shoudl be [python feedProcessing.py YYYY-MM-DD]".format(receivedArgs))

25. feedProcessing.py:227

Category: code_quality

Print statement found - should use proper logging

			else:
				print("InValid Date Format received :: {0}\n It should be [YYYY-MM-DD]".format(targetDate))
		else:
			print("Received Invalid arguements ::{0}\n It shoudl be [python feedProcessing.py YYYY-MM-DD]".format(receivedArgs))
			logger.error("Received Invalid arguements ::{0}\n It shoudl be [python feedProcessing.py YYYY-MM-DD]".format(receivedArgs))
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

26. feedProcessing.py:230

Category: code_quality

Print statement found - should use proper logging

			print("Received Invalid arguements ::{0}\n It shoudl be [python feedProcessing.py YYYY-MM-DD]".format(receivedArgs))
			logger.error("Received Invalid arguements ::{0}\n It shoudl be [python feedProcessing.py YYYY-MM-DD]".format(receivedArgs))
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		sys.exit()

27. godcrazycode.py:38

Category: code_quality

Print statement found - should use proper logging

					}
					
controlfileContent = processControlfileContents(controlfileContent,RESULT)
print ("Before controlfileContent :: ")
for item,key in controlfileContent.items():
	print (item,key)

28. godcrazycode.py:40

Category: code_quality

Print statement found - should use proper logging

controlfileContent = processControlfileContents(controlfileContent,RESULT)
print ("Before controlfileContent :: ")
for item,key in controlfileContent.items():
	print (item,key)

29. latestfeedprocessing.py:41

Category: code_quality

Print statement found - should use proper logging

if __name__ == '__main__':
    try:
        args = parse_args()
        # print("Received system args :: {0}\n Length {1}\n Type :: {2}".format(args, len(args, type(args))))
        received_AwsAppBucketName = args.aws_app_bucket
        received_StatemachineName = args.statemachine_name
        received_SourceName = args.source_name

30. latestfeedprocessing.py:206

Category: code_quality

Print statement found - should use proper logging

                                            # currentFeedValidationDirName = os.path.join(extractedFileList[0],feedName,feedType)
                                            currentFeedValidationDirName = downloadedSourceFilesBasePathWithCurrentDate +"/"+extractedFileList[0]
                                            logger.info("currentFeedValidationDirName :: {0}".format(currentFeedValidationDirName))
                                            print("#########################################################")
                                            feedRunner(currentFeedValidationDirName)
                                            print("#########################################################")
                                        else:

31. latestfeedprocessing.py:208

Category: code_quality

Print statement found - should use proper logging

                                            logger.info("currentFeedValidationDirName :: {0}".format(currentFeedValidationDirName))
                                            print("#########################################################")
                                            feedRunner(currentFeedValidationDirName)
                                            print("#########################################################")
                                        else:
                                            print("Failed Extracted the .gz file:: {0}".format(eachGZfile))
                                            logger.error("Failed Extracted the .gz file:: {0}".format(eachGZfile))

32. latestfeedprocessing.py:210

Category: code_quality

Print statement found - should use proper logging

                                            feedRunner(currentFeedValidationDirName)
                                            print("#########################################################")
                                        else:
                                            print("Failed Extracted the .gz file:: {0}".format(eachGZfile))
                                            logger.error("Failed Extracted the .gz file:: {0}".format(eachGZfile))

                    else:

33. latestfeedprocessing.py:214

Category: code_quality

Print statement found - should use proper logging

                                            logger.error("Failed Extracted the .gz file:: {0}".format(eachGZfile))

                    else:
                        print ('No ZIP files found inside the Source Directory :: {0}'.format(downloadedSourceFilesBasePathWithCurrentDate))
                        logger.error('No ZIP files found inside the Source Directory :: {0}'.format(downloadedSourceFilesBasePathWithCurrentDate))
                else:
                    print ('No Data found inside the Control File :: {0}'.format(controlFilePath))

34. latestfeedprocessing.py:217

Category: code_quality

Print statement found - should use proper logging

                        print ('No ZIP files found inside the Source Directory :: {0}'.format(downloadedSourceFilesBasePathWithCurrentDate))
                        logger.error('No ZIP files found inside the Source Directory :: {0}'.format(downloadedSourceFilesBasePathWithCurrentDate))
                else:
                    print ('No Data found inside the Control File :: {0}'.format(controlFilePath))
                    logger.error('No Data found inside the Control File :: {0}'.format(controlFilePath))
        else:
            print("Not all files downloaded/copied to local..")

35. latestfeedprocessing.py:220

Category: code_quality

Print statement found - should use proper logging

                    print ('No Data found inside the Control File :: {0}'.format(controlFilePath))
                    logger.error('No Data found inside the Control File :: {0}'.format(controlFilePath))
        else:
            print("Not all files downloaded/copied to local..")
            logger.error("Not all files downloaded/copied to local..")
    # else:
    #     print("Failed to collect the Notification Messages ..")

36. latestfeedprocessing.py:223

Category: code_quality

Print statement found - should use proper logging

            print("Not all files downloaded/copied to local..")
            logger.error("Not all files downloaded/copied to local..")
    # else:
    #     print("Failed to collect the Notification Messages ..")
    #     logger.error("Failed to collect the Notification Messages ..")
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

37. latestfeedprocessing.py:226

Category: code_quality

Print statement found - should use proper logging

    #     print("Failed to collect the Notification Messages ..")
    #     logger.error("Failed to collect the Notification Messages ..")
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        sys.exit()

38. logMonitor.py:12

Category: code_quality

Print statement found - should use proper logging

        os.makedirs(logsPath)
    logFileName = str(datetime.datetime.now().strftime("%Y%m%d_%H")) + ".log"
    logFilePath = os.path.join(logsPath, logFileName)
    print("Log File Path ::" + logFilePath)
    timeFormat = str(datetime.datetime.now().strftime("%Y%m%d %H:%M:%S"))
    logger.basicConfig(filename=logFilePath, format='%(asctime)s - %(levelname)s - %(filename)s :: %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.DEBUG, filemode='w')
except Exception as ex:

39. logMonitor.py:16

Category: code_quality

Print statement found - should use proper logging

    timeFormat = str(datetime.datetime.now().strftime("%Y%m%d %H:%M:%S"))
    logger.basicConfig(filename=logFilePath, format='%(asctime)s - %(levelname)s - %(filename)s :: %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.DEBUG, filemode='w')
except Exception as ex:
    print('Error occurred :: {0} \tLine No: {1}'.format(ex, sys.exc_info()[2].tb_lineno))
    logger.error('Error occurred :: {0} \tLine No: {1}'.format(ex, sys.exc_info()[2].tb_lineno))
    sys.exit()

40. merging.py:20

Category: code_quality

Print statement found - should use proper logging

		source_type = re.findall(source_type, str(tmp_source_path))[0]
		return source_type
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

def combinePartitionedFiles(partioned_files):

41. merging.py:41

Category: code_quality

Print statement found - should use proper logging

		# 	logger.info("MERGING is [FAILED]...")
		return merged_fileName
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

def findPartitionedFiles(dataset_id,partioned_files):

42. merging.py:54

Category: code_quality

Print statement found - should use proper logging

	"""
	try:
		if len(partioned_files) > 1 :
			print("Partitioned files [FOUND]  for  DataSet :: [{0}]".format(dataset_id))
			# Merging the partitioned file into Single File
			reveived_mergedFileName = combinePartitionedFiles(partioned_files)
		else:

43. merging.py:58

Category: code_quality

Print statement found - should use proper logging

			# Merging the partitioned file into Single File
			reveived_mergedFileName = combinePartitionedFiles(partioned_files)
		else:
			print("Partitioned files [NOT_FOUND] for  DataSet :: [{0}]".format(dataset_id))
			reveived_mergedFileName = partioned_files[0]
		return reveived_mergedFileName
	except Exception as ex:

44. merging.py:62

Category: code_quality

Print statement found - should use proper logging

			reveived_mergedFileName = partioned_files[0]
		return reveived_mergedFileName
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))


45. merging.py:86

Category: code_quality

Print statement found - should use proper logging

				mapOf_source_id_file[souce_zipfile_key].append(source_zipfile)
		return mapOf_source_id_file
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))


46. merging.py:104

Category: code_quality

Print statement found - should use proper logging

	reveived_mergedFileName = findPartitionedFiles(dataset_id,partioned_files)
	result_idfile_map[dataset_id] = reveived_mergedFileName

print(result_idfile_map)


47. recordCount.py:14

Category: code_quality

Print statement found - should use proper logging

		logger.info("PROCESSED Controller File Name :: SUCCESS")
		return controlFileData
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		sys.exit()

48. recordCount.py:35

Category: code_quality

Print statement found - should use proper logging

		logger.info("PROCESSED tempMetadataContent :: {0}".format(metadataContentMap))
		return metadataContentMap
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		sys.exit()

49. recordCount.py:47

Category: code_quality

Print statement found - should use proper logging

		logger.info("Fetched RecordCount SUCCESS -:: {0}".format(totalLines))
		return totalLines
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		sys.exit()

50. recordCount.py:61

Category: code_quality

Print statement found - should use proper logging

				metaDataItemName = metaDataItemName.strip(".gz")
			if metaDataItemName in nonMetadataContentMap.keys():
				if metaDataRecordCount == nonMetadataContentMap[metaDataItemName]:
					print ("MATCHED_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> [SOURCE] {2}, {3}".format(metaDataItemName, metaDataRecordCount, metaDataItemName, nonMetadataContentMap[metaDataItemName]))
					logger.info("MATCHED_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> [SOURCE] {2}, {3}".format(metaDataItemName, metaDataRecordCount, metaDataItemName, nonMetadataContentMap[metaDataItemName]))

				else:

51. recordCount.py:65

Category: code_quality

Print statement found - should use proper logging

					logger.info("MATCHED_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> [SOURCE] {2}, {3}".format(metaDataItemName, metaDataRecordCount, metaDataItemName, nonMetadataContentMap[metaDataItemName]))

				else:
					print ("NOT_MATCHED_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> [SOURCE]  {2}, {3}".format(metaDataItemName, metaDataRecordCount, metaDataItemName, nonMetadataContentMap[metaDataItemName]))
					logger.error("NOT_MATCHED_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> [SOURCE]  {2}, {3}".format(metaDataItemName, metaDataRecordCount, metaDataItemName, nonMetadataContentMap[metaDataItemName]))

			else:

52. recordCount.py:69

Category: code_quality

Print statement found - should use proper logging

					logger.error("NOT_MATCHED_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> [SOURCE]  {2}, {3}".format(metaDataItemName, metaDataRecordCount, metaDataItemName, nonMetadataContentMap[metaDataItemName]))

			else:
				print ("FILE_NOTAVAILALBE_TO_FETCH_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> in [SOURCE] NA ".format(metaDataItemName, metaDataRecordCount))
				logger.error ("FILE_NOTAVAILALBE_TO_FETCH_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> in [SOURCE] NA ".format(metaDataItemName, metaDataRecordCount))

	except Exception as ex:

53. recordCount.py:73

Category: code_quality

Print statement found - should use proper logging

				logger.error ("FILE_NOTAVAILALBE_TO_FETCH_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> in [SOURCE] NA ".format(metaDataItemName, metaDataRecordCount))

	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		sys.exit()

54. recordCount.py:81

Category: code_quality

Print statement found - should use proper logging

def comparisionDecider(tmpFeedTypeBasePath,metaDataFileName):
	try:
		logger.info("Received FeedTypeBasePath :: {0}".format(tmpFeedTypeBasePath))
		print("Checking FeedTypeBasePath  for :: {0}".format(tmpFeedTypeBasePath))
		nonMetadataFileNames = 	[nonMetadataFileName for nonMetadataFileName in glob.glob(tmpFeedTypeBasePath+"/*") if nonMetadataFileName]
		# nonMetadataFileNames = 	[nonMetadataFileName for nonMetadataFileName in glob.glob(tmpFeedTypeBasePath+"\*") if nonMetadataFileName]
		logger.info("nonMetadataFileNames :: {0}".format(nonMetadataFileNames))

55. recordCount.py:94

Category: code_quality

Print statement found - should use proper logging

				nonMetadataContentMap[nonMetadataFileName] = getNonMetadataFileRecordCount(nonMetadataItem)
		return compareRecordCounts(metadataContentMap,nonMetadataContentMap)
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		sys.exit()

56. recordCount.py:110

Category: code_quality

Print statement found - should use proper logging

			comparisionDecider(currentFeedValidationDirName,metaDataFileName[0])
			
		else:
			print("MetaData File doesnt Exists [Path] :: {0}".format(currentFeedValidationDirName))
			logger.error("MetaData File doesnt Exists [Path] :: {0}".format(currentFeedValidationDirName))
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

57. recordCount.py:113

Category: code_quality

Print statement found - should use proper logging

			print("MetaData File doesnt Exists [Path] :: {0}".format(currentFeedValidationDirName))
			logger.error("MetaData File doesnt Exists [Path] :: {0}".format(currentFeedValidationDirName))
	except Exception as ex:
		print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
		sys.exit()
		

58. src/gb2pr/CommonUtlity.py:24

Category: code_quality

Print statement found - should use proper logging

            logger.error("InValid Date Format received [YYYY-MM-DD] :: {0}".format(test_str))
        return res
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

def executeCmd(cmdtoexecute):

59. src/gb2pr/CommonUtlity.py:56

Category: code_quality

Print statement found - should use proper logging

        if zipfile.is_zipfile(sourceZipFilePath):
            try:
                with zipfile.ZipFile(sourceZipFilePath, mode = 'r', allowZip64 = True) as file:
                    print('File size is compatible :: Extracting all files...[STARTED]')
                    file.extractall(targetDirectoryToExtractZipFile)
                    print('Extracting all files...[COMPLETED]')
                    return file.namelist()

60. src/gb2pr/CommonUtlity.py:58

Category: code_quality

Print statement found - should use proper logging

                with zipfile.ZipFile(sourceZipFilePath, mode = 'r', allowZip64 = True) as file:
                    print('File size is compatible :: Extracting all files...[STARTED]')
                    file.extractall(targetDirectoryToExtractZipFile)
                    print('Extracting all files...[COMPLETED]')
                    return file.namelist()
            except zipfile.LargeZipFile:
                print('Error: File size if too large')

61. src/gb2pr/CommonUtlity.py:61

Category: code_quality

Print statement found - should use proper logging

                    print('Extracting all files...[COMPLETED]')
                    return file.namelist()
            except zipfile.LargeZipFile:
                print('Error: File size if too large')
                logger.error('Error: File size if too large')
                return []
        else:

62. src/gb2pr/CommonUtlity.py:65

Category: code_quality

Print statement found - should use proper logging

                logger.error('Error: File size if too large')
                return []
        else:
            print('Not a zip File :: {0}'.format(sourceZipFilePath))
            logger.error('Not a zip File :: {0}'.format(sourceZipFilePath))
            return []
    except Exception as ex:

63. src/gb2pr/CommonUtlity.py:69

Category: code_quality

Print statement found - should use proper logging

            logger.error('Not a zip File :: {0}'.format(sourceZipFilePath))
            return []
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))


64. src/gb2pr/CommonUtlity.py:91

Category: code_quality

Print statement found - should use proper logging

            logger.info("PROCESSED  .GZ File Name :: FAILED")
            return False
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))


65. src/gb2pr/CommonUtlity.py:103

Category: code_quality

Print statement found - should use proper logging

            data = json.load(f)
            return data
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

def getS3UrlsFromJsonData(tempMessageData):

66. src/gb2pr/CommonUtlity.py:126

Category: code_quality

Print statement found - should use proper logging

            return prefix[0]
        return prefix
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

67. src/gb2pr/WatchDog.py:15

Category: code_quality

Print statement found - should use proper logging

        logger.info("Constructed s3Path for [{0}] File Notification Message :: {1}".format(fileType,s3MessagePath))
        return s3MessagePath
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

def isFileExistsInS3(fileType, filePath):

68. src/gb2pr/WatchDog.py:30

Category: code_quality

Print statement found - should use proper logging

            logger.info("[{0}] File_NOT_Found ==> {1}".format(fileType, filePath))
            return False
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

def isDirExistsInS3(fileType,objName):
    try:

69. src/gb2pr/WatchDog.py:43

Category: code_quality

Print statement found - should use proper logging

            logger.info("[{0}] S3_Object_Not_Found ==> {1}".format(fileType, objName))
            return False
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

def isSourcFileMessageExists(fileType, objPath,messageFileName):

70. src/gb2pr/WatchDog.py:58

Category: code_quality

Print statement found - should use proper logging

        else:
            return False
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

def searchControlNotificationMsgFile(fileType, objPath, messageFileName):
    try:

71. src/gb2pr/WatchDog.py:71

Category: code_quality

Print statement found - should use proper logging

        else:
            return False
    except Exception as ex:
        print("Error occurred :: {0}\tLine No :: {1}".format(ex, sys.exc_info()[2].tb_lineno))

def searchSourceNotificationMsgFile(fileType, monitoringInterval,listOfSoruceMessageObjPaths,messageFileName):
    try:

72. src/gb2pr/WatchDog.py:81

Category: code_quality

Print statement found - should use proper logging

                sourceFileCounter = sourceFileCounter+1
                time.sleep(10)
        if sourceFileCounter != len(listOfSoruceMessageObjPaths):
            print (" Fetched Data and [Received Count vs Target Count] ==> {0} {1}".format(sourceFileCounter, len(listOfSoruceMessageObjPaths)))
            print("Sleeping for {0}secs".format(monitoringInterval))
            time.sleep(monitoringInterval)
            searchSourceNotificationMsgFile(fileType, monitoringInterval,listOfSoruceMessageObjPaths)

73. src/gb2pr/WatchDog.py:82

Category: code_quality

Print statement found - should use proper logging

                time.sleep(10)
        if sourceFileCounter != len(listOfSoruceMessageObjPaths):
            print (" Fetched Data and [Received Count vs Target Count] ==> {0} {1}".format(sourceFileCounter, len(listOfSoruceMessageObjPaths)))
            print("Sleeping for {0}secs".format(monitoringInterval))
            time.sleep(monitoringInterval)
            searchSourceNotificationMsgFile(fileType, monitoringInterval,listOfSoruceMessageObjPaths)
            return True

74. src/gb2pr/WatchDog.py:87

Category: code_quality

Print statement found - should use proper logging

            searchSourceNotificationMsgFile(fileType, monitoringInterval,listOfSoruceMessageObjPaths)
            return True
        else:
            print ( "Fetched Data and [Received Count vs Target Count] ==> {0} {1}".format(sourceFileCounter, len(listOfSoruceMessageObjPaths)))
            return True
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

75. src/gb2pr/WatchDog.py:90

Category: code_quality

Print statement found - should use proper logging

            print ( "Fetched Data and [Received Count vs Target Count] ==> {0} {1}".format(sourceFileCounter, len(listOfSoruceMessageObjPaths)))
            return True
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

76. src/gb2pr/compareFileNameSize.py:15

Category: code_quality

Print statement found - should use proper logging

            controlFileMapofItems[line.split('\t')[0]] = int(line.split('\t')[1])
        return controlFileMapofItems
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        sys.exit()

77. src/gb2pr/compareFileNameSize.py:22

Category: code_quality

Print statement found - should use proper logging

#Compare the filenames and its sizes.
def compareSourceandControlFile(tempControlFileContent,temp_controlFileContentSize, temp_SourcefileDict):
    try:
        print("RECEIVED//Searching   tempControlFileContent :: {0}".format(tempControlFileContent))
        for eachItem in temp_SourcefileDict.keys():
            absPathofSourceFile = os.path.abspath(eachItem)
            head, tail = os.path.split(absPathofSourceFile)

78. src/gb2pr/compareFileNameSize.py:35

Category: code_quality

Print statement found - should use proper logging

                    return "FileSizeNotMatches", absPathofSourceFile

    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        sys.exit()

79. src/gb2pr/godcrazycode.py:37

Category: code_quality

Print statement found - should use proper logging

                    }
                    
controlfileContent = processControlfileContents(controlfileContent,RESULT)
print ("Before controlfileContent :: ")
for item,key in controlfileContent.items():
    print (item,key)

80. src/gb2pr/godcrazycode.py:39

Category: code_quality

Print statement found - should use proper logging

controlfileContent = processControlfileContents(controlfileContent,RESULT)
print ("Before controlfileContent :: ")
for item,key in controlfileContent.items():
    print (item,key)

81. src/gb2pr/logMonitor.py:15

Category: code_quality

Print statement found - should use proper logging

        os.makedirs(logsPath)
    logFileName = str(datetime.datetime.now().strftime("%Y%m%d_%H")) + ".log"
    logFilePath = os.path.join(logsPath, logFileName)
    print("Log File Path ::" + logFilePath)
    timeFormat = str(datetime.datetime.now().strftime("%Y%m%d %H:%M:%S"))
    logger.basicConfig(filename=logFilePath, format='%(asctime)s - %(levelname)s - %(filename)s :: %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.DEBUG, filemode='w')
except Exception as ex:

82. src/gb2pr/logMonitor.py:19

Category: code_quality

Print statement found - should use proper logging

    timeFormat = str(datetime.datetime.now().strftime("%Y%m%d %H:%M:%S"))
    logger.basicConfig(filename=logFilePath, format='%(asctime)s - %(levelname)s - %(filename)s :: %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.DEBUG, filemode='w')
except Exception as ex:
    print('Error occurred :: {0} \tLine No: {1}'.format(ex, sys.exc_info()[2].tb_lineno))
    logger.error('Error occurred :: {0} \tLine No: {1}'.format(ex, sys.exc_info()[2].tb_lineno))
    sys.exit()

83. src/gb2pr/merging.py:17

Category: code_quality

Print statement found - should use proper logging

        source_type = re.findall(source_type, str(tmp_source_path))[0]
        return source_type
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

def combinePartitionedFiles(partioned_files):

84. src/gb2pr/merging.py:26

Category: code_quality

Print statement found - should use proper logging

        merged_fileName = ".".join(partioned_files[0].split(".")[:-1])
        return merged_fileName
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

def findPartitionedFiles(dataset_id,partioned_files):

85. src/gb2pr/merging.py:32

Category: code_quality

Print statement found - should use proper logging

def findPartitionedFiles(dataset_id,partioned_files):
    try:
        if len(partioned_files) > 1 :
            print("Partitioned files [FOUND]  for  DataSet :: [{0}]".format(dataset_id))
            reveived_mergedFileName = combinePartitionedFiles(partioned_files)
        else:
            print("Partitioned files [NOT_FOUND] for  DataSet :: [{0}]".format(dataset_id))

86. src/gb2pr/merging.py:35

Category: code_quality

Print statement found - should use proper logging

            print("Partitioned files [FOUND]  for  DataSet :: [{0}]".format(dataset_id))
            reveived_mergedFileName = combinePartitionedFiles(partioned_files)
        else:
            print("Partitioned files [NOT_FOUND] for  DataSet :: [{0}]".format(dataset_id))
            reveived_mergedFileName = partioned_files[0]
        return reveived_mergedFileName
    except Exception as ex:

87. src/gb2pr/merging.py:39

Category: code_quality

Print statement found - should use proper logging

            reveived_mergedFileName = partioned_files[0]
        return reveived_mergedFileName
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))


88. src/gb2pr/merging.py:56

Category: code_quality

Print statement found - should use proper logging

                mapOf_source_id_file[souce_zipfile_key].append(source_zipfile)
        return mapOf_source_id_file
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))


89. src/gb2pr/merging.py:67

Category: code_quality

Print statement found - should use proper logging

        reveived_mergedFileName = findPartitionedFiles(dataset_id,partioned_files)
        result_idfile_map[dataset_id] = reveived_mergedFileName

    print(result_idfile_map)

90. src/gb2pr/recordCount.py:16

Category: code_quality

Print statement found - should use proper logging

        logger.info("PROCESSED Controller File Name :: SUCCESS")
        return controlFileData
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        sys.exit()

91. src/gb2pr/recordCount.py:37

Category: code_quality

Print statement found - should use proper logging

        logger.info("PROCESSED tempMetadataContent :: {0}".format(metadataContentMap))
        return metadataContentMap
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        sys.exit()

92. src/gb2pr/recordCount.py:49

Category: code_quality

Print statement found - should use proper logging

        logger.info("Fetched RecordCount SUCCESS -:: {0}".format(totalLines))
        return totalLines
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        sys.exit()

93. src/gb2pr/recordCount.py:63

Category: code_quality

Print statement found - should use proper logging

                metaDataItemName = metaDataItemName.strip(".gz")
            if metaDataItemName in nonMetadataContentMap.keys():
                if metaDataRecordCount == nonMetadataContentMap[metaDataItemName]:
                    print ("MATCHED_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> [SOURCE] {2}, {3}".format(metaDataItemName, metaDataRecordCount, metaDataItemName, nonMetadataContentMap[metaDataItemName]))
                    logger.info("MATCHED_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> [SOURCE] {2}, {3}".format(metaDataItemName, metaDataRecordCount, metaDataItemName, nonMetadataContentMap[metaDataItemName]))

                else:

94. src/gb2pr/recordCount.py:67

Category: code_quality

Print statement found - should use proper logging

                    logger.info("MATCHED_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> [SOURCE] {2}, {3}".format(metaDataItemName, metaDataRecordCount, metaDataItemName, nonMetadataContentMap[metaDataItemName]))

                else:
                    print ("NOT_MATCHED_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> [SOURCE]  {2}, {3}".format(metaDataItemName, metaDataRecordCount, metaDataItemName, nonMetadataContentMap[metaDataItemName]))
                    logger.error("NOT_MATCHED_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> [SOURCE]  {2}, {3}".format(metaDataItemName, metaDataRecordCount, metaDataItemName, nonMetadataContentMap[metaDataItemName]))

            else:

95. src/gb2pr/recordCount.py:71

Category: code_quality

Print statement found - should use proper logging

                    logger.error("NOT_MATCHED_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> [SOURCE]  {2}, {3}".format(metaDataItemName, metaDataRecordCount, metaDataItemName, nonMetadataContentMap[metaDataItemName]))

            else:
                print ("FILE_NOTAVAILALBE_TO_FETCH_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> in [SOURCE] NA ".format(metaDataItemName, metaDataRecordCount))
                logger.error ("FILE_NOTAVAILALBE_TO_FETCH_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> in [SOURCE] NA ".format(metaDataItemName, metaDataRecordCount))

    except Exception as ex:

96. src/gb2pr/recordCount.py:75

Category: code_quality

Print statement found - should use proper logging

                logger.error ("FILE_NOTAVAILALBE_TO_FETCH_RECORD_COUNT :: [METADATA-FILE] {0}, {1} <==> in [SOURCE] NA ".format(metaDataItemName, metaDataRecordCount))

    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        sys.exit()

97. src/gb2pr/recordCount.py:83

Category: code_quality

Print statement found - should use proper logging

def comparisionDecider(tmpFeedTypeBasePath,metaDataFileName):
    try:
        logger.info("Received FeedTypeBasePath :: {0}".format(tmpFeedTypeBasePath))
        print("Checking FeedTypeBasePath  for :: {0}".format(tmpFeedTypeBasePath))
        nonMetadataFileNames =  [nonMetadataFileName for nonMetadataFileName in glob.glob(tmpFeedTypeBasePath+"/*") if nonMetadataFileName]
        logger.info("nonMetadataFileNames :: {0}".format(nonMetadataFileNames))
        metadataContent = (readTheFileBasedonSeperator(metaDataFileName))

98. src/gb2pr/recordCount.py:95

Category: code_quality

Print statement found - should use proper logging

                nonMetadataContentMap[nonMetadataFileName] = getNonMetadataFileRecordCount(nonMetadataItem)
        return compareRecordCounts(metadataContentMap,nonMetadataContentMap)
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        sys.exit()

99. src/gb2pr/recordCount.py:111

Category: code_quality

Print statement found - should use proper logging

            comparisionDecider(currentFeedValidationDirName,metaDataFileName[0])

        else:
            print("MetaData File doesnt Exists [Path] :: {0}".format(currentFeedValidationDirName))
            logger.error("MetaData File doesnt Exists [Path] :: {0}".format(currentFeedValidationDirName))
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))

100. src/gb2pr/recordCount.py:114

Category: code_quality

Print statement found - should use proper logging

            print("MetaData File doesnt Exists [Path] :: {0}".format(currentFeedValidationDirName))
            logger.error("MetaData File doesnt Exists [Path] :: {0}".format(currentFeedValidationDirName))
    except Exception as ex:
        print("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        logger.error("Error occurred :: {0}\tLine No:: {1}".format(ex, sys.exc_info()[2].tb_lineno))
        sys.exit()

Full report available in workflow artifacts.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions