frictionlessdata / datapackage-py

A Python library for working with Data Packages.
https://frictionlessdata.io
MIT License
189 stars 44 forks source link

Fix save order for Package save method #204

Closed dahlbaek closed 6 years ago

dahlbaek commented 6 years ago

According to the documentation, save should prioritize saving to storage over saving to json.

package.save(target, storage=None, **options) Saves this data package to storage if storage argument is passed or saves this data package's descriptor to json file if target arguments ends with .json or saves this data package to zip file otherwise.

Proritizing saving to storage over saving to json is also consistent with the behaviour of the resource save method.