[Simple-cdd-devel] Bug#861198: Shutting down public FTP services
Enrico Zini
enrico at enricozini.org
Mon May 15 16:54:10 UTC 2017
On Mon, May 15, 2017 at 09:46:08AM -0700, Vagrant Cascadian wrote:
> > - prefix_len = 7 + len(env.get("DI_CODENAME")) # dists/{DI_CODENAME}/
> > - relname = file[prefix_len:]
> > + separator = os.path.join('dists/', env.get("DI_CODENAME"), '')
> > + separator, relname = file.split(separator)
> If I remember correctly, it is trying to split a filename based on
> dists/CODENAME, so maybe os.path.split would be appropriate here; will
> look into it.
os.path.relpath might also help.
> > I noticed that verify_file in simple_cdd/utils.py already throws Fail if
> > something is wrong. I would get rid of the try/except block altogether,
> > and just call verify_file.
> I think with these I was getting an ugly traceback when the file failed
> to verify, so wanted to actually give the user something more freindly
> than a traceback... will try your patch again, tweak the file between
> download and verify, and see if it still spits out the tracebacks.
If what is thrown is Fail, that shouldn't happen: build-simple-cdd has
this that catches it and only logs the error message instead of the
traceback:
except Fail as e:
#import traceback
#traceback.print_stack()
log.error(*e.args)
scdd.paranoid_checks()
result = 1
isoname = None
If it spits out a traceback instead, send it to me and I'll see if
there's somewhere where some other exception should be turned into Fail.
Enrico
--
GPG key: 4096R/634F4BD1E7AD5568 2009-05-08 Enrico Zini <enrico at enricozini.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/simple-cdd-devel/attachments/20170515/9397b3c1/attachment.sig>
More information about the Simple-cdd-devel
mailing list