On 2017-05-15, Enrico Zini wrote:
> 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.split only takes a single argument, and splits in a predetermined way. e.g. /foo/bar/baz is split into /foo/bar and baz. > os.path.relpath might also help. This also takes a single argument, turning a full path into a relative path. e.g. /foo/bar/baz gives ../../../foo/bar/baz So, I'm not sure either of those will be helpful here. To keep the diff small, I could just revert to your original code, as it works and my change there isn't strictly necessary; it's just easier for me to see what's going on. live well, vagrant
signature.asc
Description: PGP signature

