bugfix 1.3.10
Arthur Clune <[email protected]>
| Newsgroups | gmane.network.up2date.current.devel |
|---|---|
| Message-ID | <[email protected]> |
OK, the following *seems* to solve the problem I had. The problem seems to be that when two versions of a package exist and the db is blank, the create_channel bit fails because no last_modified data exists when the package details come to be erased (they haven't been written yet). I've also added a test that file deletion occurs successfully, since this was giving me problems as well (for I think similar reasons - the file didn't exist). Please go easy on the code..."Programming Python" only landed on my desk at lunchtime yesterday so you could say I'm a little new to the language. Arthur -- Arthur Clune [email protected] We are the sum of the things we pretend to be, so we must be careful who we pretend to be - Kurt Vonnegut
channel.diff
(application/octet-stream, 1.3 KB)
--- channel.py Tue Aug 20 14:18:50 2002
+++ /var/www/html/channel.py_orig Tue Aug 20 12:31:22 2002
@@ -258,15 +258,9 @@
pkg.append(self.chanInfo['label'])
nlist.append(pkg)
nlist = (nlist,)
-
- try:
- filename = misc.PathJoin(self.chanInfo['list_dir'], self.chanInfo['last_modified'])
- except:
- self.chanInfo['last_modified'] = time.strftime("%Y%m%d%H%M%S",
- time.localtime(time.time()))
- filename = misc.PathJoin(self.chanInfo['list_dir'], self.chanInfo['last_modified'])
- pl_file = open(filename, 'w')
+ filename = misc.PathJoin(self.chanInfo['list_dir'], self.chanInfo['last_modified'])
+ pl_file = open(filename, 'w')
str = xmlrpclib.dumps(nlist, methodresponse=1)
pl_file.write(str)
@@ -979,13 +973,8 @@
self._shelfRemove(self.dep_obsoletes, onames[i], value)
# Remove the symlink
- try:
- print 'deleting file ', os.path.basename(pathname)
- os.remove(misc.JoinPath(self.chanInfo['package_dir'],
+ os.remove(misc.JoinPath(self.chanInfo['package_dir'],
os.path.basename(pathname)))
- except:
- log("Cannot delete file %s " % os.path.basename, MANDATORY)
- return
# Remove the cached header
hdr_name = string.replace(file, '.rpm', '.hdr')