fedora-updates-system/updatessystem buildsys.py, 1.2, 1.3 controllers.py, 1.6, 1.7
Luke Macken (lmacken)
fedora-extras-commits at redhat.com
Thu Dec 7 07:29:48 UTC 2006
- Previous message (by thread): fedora-updates-system/updatessystem/templates list.kid, 1.2, 1.3 master.kid, 1.3, 1.4 show.kid, 1.2, 1.3
- Next message (by thread): rpms/gparted/FC-5 .cvsignore, 1.11, 1.12 gparted.spec, 1.16, 1.17 sources, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: lmacken
Update of /cvs/fedora/fedora-updates-system/updatessystem
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15101/updatessystem
Modified Files:
buildsys.py controllers.py
Log Message:
Catch SRPMNotFound exception when building filelist
Index: buildsys.py
===================================================================
RCS file: /cvs/fedora/fedora-updates-system/updatessystem/buildsys.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- buildsys.py 7 Dec 2006 07:19:41 -0000 1.2
+++ buildsys.py 7 Dec 2006 07:29:47 -0000 1.3
@@ -6,7 +6,7 @@
from turbogears import config
from exceptions import Exception
-class SRPMNotFoundException(Exception):
+class SRPMNotFound(Exception):
pass
class Buildsys:
@@ -39,7 +39,7 @@
"%s.src.rpm" % update.nvr)
if not os.path.isfile(srpm):
print "Cannot find", srpm
- raise SRPMNotFoundException
+ raise SRPMNotFound
return srpm
## We're dealing with local testing first
Index: controllers.py
===================================================================
RCS file: /cvs/fedora/fedora-updates-system/updatessystem/controllers.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- controllers.py 7 Dec 2006 07:19:41 -0000 1.6
+++ controllers.py 7 Dec 2006 07:29:47 -0000 1.7
@@ -9,6 +9,7 @@
from push import PushController
from model import Package, PackageUpdate, Release, Bugzilla, CVE
from sqlite import IntegrityError
+from buildsys import SRPMNotFound
from sqlobject import SQLObjectNotFound
from elementtree import ElementTree as ET
from updatessystem import json
@@ -131,6 +132,7 @@
package = Package.byName(name)
p = PackageUpdate(package=package, release=release,
submitter='FIXME', **kw)
+ p.build_filelist()
# TODO: we should eventually put all of this stuff into a
# FancyValidator for the Package field
@@ -143,8 +145,10 @@
except IntegrityError:
flash("Update for %s already exists" % kw['nvr'])
raise redirect('/new')
+ except SRPMNotFound:
+ flash("Cannot find SRPM for update")
+ raise redirect('/new')
log.debug("Adding new update %s" % package)
- p.build_filelist()
else: # edited update
from datetime import datetime
log.debug("Edited update %s" % edited)
- Previous message (by thread): fedora-updates-system/updatessystem/templates list.kid, 1.2, 1.3 master.kid, 1.3, 1.4 show.kid, 1.2, 1.3
- Next message (by thread): rpms/gparted/FC-5 .cvsignore, 1.11, 1.12 gparted.spec, 1.16, 1.17 sources, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list