Skip to content

Commit 02c2d60

Browse files
authored
Merge pull request #45 from transfluxus/main
Update lca.py
2 parents 310c6d3 + d07f9f1 commit 02c2d60

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bw_temporalis/lca.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -306,16 +306,16 @@ def get_biosphere_exchanges(self, flow_id: int, activity_id: int) -> Iterable[ED
306306

307307
def get_technosphere_exchange(self, input_id: int, output_id: int) -> ED:
308308
def printer(x):
309-
return "{}|{}|{}".format(x.database, x.name, x.code)
309+
return "({}|{}|{})".format(x['database'], x['code'], x['name'])
310310

311311
exchanges = self._exchange_iterator(input_id, output_id)
312312
if len(exchanges) > 1:
313+
_exchange = Exchange(exchanges[0])
313314
raise MultipleTechnosphereExchanges(
314315
"Found {} exchanges for link between {} and {}".format(
315316
len(exchanges),
316-
printer(exchanges[0].input),
317-
printer(exchanges[0].output),
318-
)
317+
printer(_exchange.input),
318+
printer(_exchange.output))
319319
)
320320
elif not exchanges:
321321
# Edge injected via datapackage, no exchange in dataset

0 commit comments

Comments
 (0)