mediachain / oldchain-client

[DEPRECATED] old mediachain client experiments
MIT License
4 stars 2 forks source link

fix for missing asset uri and invalid multihash ref #98

Closed yusefnapora closed 8 years ago

yusefnapora commented 8 years ago

prevents an exception if a remote __mediachain_asset__ in the translator output does not have a uri key. This can happen when all you have is a local asset without a remote asset uri. Now it will still add the local asset to ipfs and not die with a LookupException

Also validates the multihash in MultihashReference.__init__, since I discovered that if you use the multihash_ref helper it can let invalid strings through.

parkan commented 8 years ago

:+1:

in general this bit

if you use the multihash_ref helper it can let invalid strings through.

shouldn't happen but let's not worry about it right now (unless you're missing a "not" in there?)

yusefnapora commented 8 years ago

oh yeah, I meant previously, that could happen. this branch fixes it :)