polyswarm-api 3.9.0__tar.gz → 3.10.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyswarm-api
3
- Version: 3.9.0
3
+ Version: 3.10.0
4
4
  Summary: Client library to simplify interacting with the PolySwarm consumer API
5
5
  Home-page: https://github.com/polyswarm/polyswarm-api
6
6
  Author: PolySwarm Developers
@@ -9,7 +9,7 @@ with open('README.md', 'r') as readme:
9
9
 
10
10
  setup(
11
11
  name='polyswarm-api',
12
- version='3.9.0',
12
+ version='3.10.0',
13
13
  description='Client library to simplify interacting with the PolySwarm consumer API',
14
14
  long_description=long_description,
15
15
  long_description_content_type='text/markdown',
@@ -1,5 +1,5 @@
1
1
  # https://www.python.org/dev/peps/pep-0008/#module-level-dunder-names
2
- __version__ = '3.9.0'
2
+ __version__ = '3.10.0'
3
3
  __release_url__ = 'https://api.github.com/repos/polyswarm/polyswarm-api/releases/latest'
4
4
 
5
5
  from . import api
@@ -295,6 +295,7 @@ class ArtifactInstance(core.BaseJsonResource, core.Hashable):
295
295
  self.community = content.get('community')
296
296
  self.created = core.parse_isoformat(content.get('created'))
297
297
  self.failed = content.get('failed')
298
+ self.failed_reason = content.get('failed_reason')
298
299
  self.filename = content.get('filename')
299
300
  self.result = content.get('result')
300
301
  self.type = content.get('type')
@@ -1131,6 +1132,10 @@ class ReportTask(core.BaseJsonResource):
1131
1132
 
1132
1133
  def download_report(self, folder=None):
1133
1134
  """ This method is special, in that it is simply for downloading from S3 """
1135
+ if self.state == 'PENDING':
1136
+ raise exceptions.InvalidValueException('Report is in PENDING state, wait for completion first')
1137
+ if self.state == 'FAILED':
1138
+ raise exceptions.InvalidValueException("Report is in FAILED state, won't be generated")
1134
1139
  return core.PolyswarmRequest(
1135
1140
  self.api,
1136
1141
  {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyswarm-api
3
- Version: 3.9.0
3
+ Version: 3.10.0
4
4
  Summary: Client library to simplify interacting with the PolySwarm consumer API
5
5
  Home-page: https://github.com/polyswarm/polyswarm-api
6
6
  Author: PolySwarm Developers
File without changes
File without changes
File without changes