Proyecto

General

Perfil

« Anterior | Siguiente » 

Revisión 41

Corrigiendo bug en la generación del md5

Ver diferencias:

main.py
logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG)
def checkmd5File(md5File):
def checkmd5File(pathFileName):
md5File = pathFileName+'.md5'
if not os.path.isfile(md5File):
md5Hash = MyUtils.getMD5Hash(downloadsPath + i)
f = open(md5File,'wt')
md5Hash = MyUtils.getMD5Hash(pathFileName+'.iso')
f = open(md5File, 'wt')
f.write(md5Hash)
f.close()
......
for i in listFiles:
if os.path.isfile(downloadsPath + i) and i.endswith('.iso'):
fileName = MyUtils.getFileName(os.path.basename(i))
md5File = downloadsPath + fileName + '.md5'
pathFileName = downloadsPath + fileName
checkmd5File(md5File)
checkmd5File(pathFileName)
service = ZeroconfService.ZeroconfService(name = str(portWebServer)+"@"+i, port=3000, stype = "_autoclone_"+classroomName+"._tcp") #, domain="replicant", host="localhost", text="Esto es una prueba")
service.publish()

Exportar a: Unified diff