polyswarm-api 3.5.2__tar.gz → 3.6.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.5.2
3
+ Version: 3.6.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.5.2',
12
+ version='3.6.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.5.2'
2
+ __version__ = '3.6.0'
3
3
  __release_url__ = 'https://api.github.com/repos/polyswarm/polyswarm-api/releases/latest'
4
4
 
5
5
  from . import api
@@ -245,7 +245,7 @@ class PolyswarmAPI(object):
245
245
  scan_config=scan_config,
246
246
  community=self.community).result()
247
247
  instance.upload_file(artifact)
248
- return resources.ArtifactInstance.update(self, id=instance.id).result()
248
+ return resources.ArtifactInstance.update(self, id=instance.id, community=self.community).result()
249
249
  else:
250
250
  raise exceptions.InvalidValueException('Artifacts should be a path to a file or a LocalArtifact instance')
251
251
 
@@ -716,7 +716,7 @@ class PolyswarmAPI(object):
716
716
  vm_slug=vm_slug,
717
717
  network_enabled=network_enabled).result()
718
718
  task.upload_file(artifact)
719
- return resources.SandboxTask.update_file(self, id=task.id).result()
719
+ return resources.SandboxTask.update_file(self, id=task.id, community=self.community).result()
720
720
  else:
721
721
  raise exceptions.InvalidValueException(
722
722
  'Artifacts should be a path to a file or a LocalArtifact instance')
@@ -733,7 +733,7 @@ class PolyswarmAPI(object):
733
733
  browser=browser,
734
734
  network_enabled=True).result()
735
735
  task.upload_file(artifact)
736
- return resources.SandboxTask.update_file(self, id=task.id).result()
736
+ return resources.SandboxTask.update_file(self, id=task.id, community=self.community).result()
737
737
 
738
738
  def sandbox_providers(self):
739
739
  """
@@ -307,7 +307,10 @@ class ArtifactInstance(core.BaseJsonResource, core.Hashable):
307
307
  self.votes = [Vote(v, api=api, scanfile=self) for v in content.get('votes', [])]
308
308
  self.window_closed = content.get('window_closed')
309
309
  self.polyscore = float(content['polyscore']) if content.get('polyscore') is not None else None
310
- self.permalink = settings.DEFAULT_PERMALINK_BASE + '/' + str(self.hash) + '/' + str(self.id)
310
+ if content.get('permalink'):
311
+ self.permalink = content.get('permalink')
312
+ else:
313
+ self.permalink = settings.DEFAULT_PERMALINK_BASE + '/' + str(self.hash) + '/' + str(self.id)
311
314
 
312
315
  self._malicious_assertions = None
313
316
  self._benign_assertions = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyswarm-api
3
- Version: 3.5.2
3
+ Version: 3.6.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
File without changes