> On Aug 10, 2016, at 9:37 PM, Ryan Schmidt <[email protected]> wrote:
> 
>> On Aug 10, 2016, at 1:13 PM, [email protected] wrote:
>> 
>> --- contrib/buildbot-test/master.cfg 2016-08-10 18:09:29 UTC (rev 151215)
>> +++ contrib/buildbot-test/master.cfg 2016-08-10 18:13:02 UTC (rev 151216)
>> @@ -368,6 +368,7 @@
>> 
>> portbuilder_factory = BuildFactory()
>> portbuilder_factory.workdir = '../build'
>> +logdir = "{}/logs".format(portbuilder_factory.workdir)
> 
> Is this different from:
> 
> logdir = portbuilder_factory.workdir + "/logs"
> 
> ?

Technically, they are different. For instance, if
portbuilder_factory.workdir were (for some reason) not a string, the
former would still work but the latter would not.

Practically, they probably produce the same result.

But neither is the "right" way:

    import os
    logdir = os.path.join(portbuilder_factory.workdir, "logs")

vq
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to