Changeset 2412 for pykota/trunk
- Timestamp:
- 08/29/05 12:59:14 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r2411 r2412 301 301 """Saves the input datas into a static file.""" 302 302 self.logdebug("Duplicating data stream into %s" % self.DataFile) 303 self.regainPriv()304 303 mustclose = 0 304 outfile = open(self.DataFile, "wb") 305 305 if self.InputFile is not None : 306 self.regainPriv() 306 307 infile = open(self.InputFile, "rb") 307 308 mustclose = 1 … … 312 313 sizeread = 0 313 314 checksum = md5.new() 314 outfile = open(self.DataFile, "wb")315 315 while 1 : 316 316 data = infile.read(CHUNK) … … 323 323 self.logdebug("%s bytes saved..." % sizeread) 324 324 dummy += 1 325 outfile.close()326 325 if mustclose : 327 326 infile.close() 328 327 self.dropPriv() 328 329 outfile.close() 329 330 self.JobSizeBytes = sizeread 330 331 self.JobMD5Sum = checksum.hexdigest() … … 332 333 self.logdebug("JobSizeBytes : %s" % self.JobSizeBytes) 333 334 self.logdebug("JobMD5Sum : %s" % self.JobMD5Sum) 334 self.dropPriv()335 335 self.logdebug("Data stream duplicated into %s" % self.DataFile) 336 336