extras-buildsys/server ArchJob.py,1.15,1.16
Daniel Williams (dcbw)
fedora-extras-commits at redhat.com
Fri Sep 16 18:11:22 UTC 2005
Author: dcbw
Update of /cvs/fedora/extras-buildsys/server
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8896/server
Modified Files:
ArchJob.py
Log Message:
2005-09-16 Dan Williams <dcbw at redhat.com>
* builder/builder.py
common/FileDownloader.py
server/ArchJob.py
- Rename FileNameError -> FileNameException
* builder/builder.py
- Clean up exception handling on job creation so that we
don't end up calling start() before Thread.__init__() got
called.
Index: ArchJob.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/ArchJob.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ArchJob.py 8 Sep 2005 21:10:25 -0000 1.15
+++ ArchJob.py 16 Sep 2005 18:11:20 -0000 1.16
@@ -187,15 +187,20 @@
target_dir = os.path.join(self.par_job.get_stage_dir(), self._target_dict['arch'])
if not os.path.exists(target_dir):
os.makedirs(target_dir)
- if self._use_ssl:
- dl_thread = FileDownloader.FileDownloader(self.dl_callback, url, url,
- target_dir, ['.rpm', '.log'], self._certs)
- else:
- dl_thread = FileDownloader.FileDownloader(self.dl_callback, url, url,
- target_dir, ['.rpm', '.log'], None)
- dl_thread.start()
- undownloaded = True
- self.downloads[url] = 1
+ try:
+ if self._use_ssl:
+ dl_thread = FileDownloader.FileDownloader(self.dl_callback, url, url,
+ target_dir, ['.rpm', '.log'], self._certs)
+ else:
+ dl_thread = FileDownloader.FileDownloader(self.dl_callback, url, url,
+ target_dir, ['.rpm', '.log'], None)
+ dl_thread.start()
+ undownloaded = True
+ self.downloads[url] = 1 # In Progress
+ except FileDownloader.FileNameException, e:
+ print "%s (%s/%s): [ %s ] Bad file name error when getting %s: '%s'" % (self.par_job.uid,
+ self.par_job.package, self._target_dict['arch'], self.bci.address(), url, e)
+ self.downloads[url] = 2 # Error
break
elif dl_status == 1:
# in progress
@@ -251,7 +256,7 @@
fname = FileDownloader.get_base_filename_from_url(url, ['.rpm', '.log'])
if self.downloads[url] == 3:
files.append(fname)
- except FileDownloader.FileNameError, e:
+ except FileDownloader.FileNameException, e:
# Just ignore the file then
print "%s (%s/%s): Illegal file name. Error: '%s', URL: %s" % (self.par_job.uid,
self.par_job.package, self._target_dict['arch'], e, url)
More information about the fedora-extras-commits
mailing list