ledgered 0.6.4.dev2__py3-none-any.whl → 0.7.1.dev2__py3-none-any.whl

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.
ledgered/__version__.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.6.4.dev2'
16
- __version_tuple__ = version_tuple = (0, 6, 4, 'dev2')
15
+ __version__ = version = '0.7.1.dev2'
16
+ __version_tuple__ = version_tuple = (0, 7, 1, 'dev2')
ledgered/github.py CHANGED
@@ -1,5 +1,6 @@
1
1
  from enum import IntEnum, auto
2
2
  from github import ContentFile as PyContentFile, Github as PyGithub, Repository as PyRepository
3
+ from github.GithubException import UnknownObjectException
3
4
  from pathlib import Path
4
5
  from typing import List, Optional
5
6
  from unittest.mock import patch
@@ -15,6 +16,13 @@ class Condition(IntEnum):
15
16
  ONLY = auto()
16
17
 
17
18
 
19
+ class NoManifestException(FileNotFoundError):
20
+
21
+ def __init__(self, repository: "AppRepository"):
22
+ super().__init__(f"`ledger_app.toml` manifest not found in repository '{repository.url}', "
23
+ f"branch '{repository.current_branch}'.")
24
+
25
+
18
26
  class AppRepository(PyRepository.Repository):
19
27
 
20
28
  def __init__(self, *args, **kwargs) -> None:
@@ -26,7 +34,13 @@ class AppRepository(PyRepository.Repository):
26
34
  @property
27
35
  def manifest(self) -> Manifest:
28
36
  if self._manifest is None:
29
- manifest = self.get_contents(MANIFEST_FILE_NAME, ref=self.current_branch)
37
+ try:
38
+ manifest = self.get_contents(MANIFEST_FILE_NAME, ref=self.current_branch)
39
+ except UnknownObjectException as e:
40
+ if e.status == 404:
41
+ raise NoManifestException(self)
42
+ raise e
43
+
30
44
  # `get_contents` can return a list, but here there can only be one manifest
31
45
  assert isinstance(manifest, PyContentFile.ContentFile)
32
46
  manifest_content = manifest.decoded_content.decode()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ledgered
3
- Version: 0.6.4.dev2
3
+ Version: 0.7.1.dev2
4
4
  Summary: Python tools, utils, libraries, to be used with Ledger cryptodevices
5
5
  Author-email: Ledger <hello@ledger.fr>
6
6
  License: MIT License
@@ -61,4 +61,4 @@ devices (NanoS, S+, X and Stax).
61
61
 
62
62
  ## Library sections
63
63
 
64
- - [`ledger.utils.manifest` ](doc/manifest.md)
64
+ - [`ledger.manifest` ](doc/manifest.md)
@@ -1,7 +1,7 @@
1
1
  ledgered/__init__.py,sha256=aRY9b0H6CrS8gUFvdWHz-IPvyBm0i8i8paMzmE1BuK4,126
2
- ledgered/__version__.py,sha256=4wLUjzmHgQNi7bVKFz4hZ6hhGMcqPKB0yt1QF0yGfkI,424
2
+ ledgered/__version__.py,sha256=DV5iMrIdbuetPRzfK3MhFOvjsHPrg8YKG_O6dwwGSiI,424
3
3
  ledgered/binary.py,sha256=J49o5kDwmvo_hBsHfl88qxRteo6AqleoUJcjBDHp-Os,2664
4
- ledgered/github.py,sha256=qpIYoaprwjh2dR1H8_I_aw-_Nl4i-whdwO2FH59yIHI,4708
4
+ ledgered/github.py,sha256=99jwcSz6XNagsbj1XgdwMPzESOkh-VUUaoaxhUgN1rI,5217
5
5
  ledgered/serializers.py,sha256=DKcz7X3hz3Qoumv9neoqK4xLh13ZBE5rOJv0KdZxZes,1624
6
6
  ledgered/manifest/__init__.py,sha256=YbsDtjHJsUO0T37GQKoMSrC44sfcSq0JTSjDN6xrc64,243
7
7
  ledgered/manifest/app.py,sha256=xK9vW7nABsuxPNzj1wpeZd5T9y3PVBhwSAw3LlHdtGQ,1084
@@ -13,9 +13,9 @@ ledgered/manifest/tests.py,sha256=Zh-c_pZ4XzMKU7Pp7P-iltBnfrG8iRjO9drRtyJIUW8,33
13
13
  ledgered/manifest/use_cases.py,sha256=Zu5ufX29iBlFEWYAQhx3YDY_ajd0539F5pW8aULMyEw,898
14
14
  ledgered/manifest/utils.py,sha256=HnqQVH6MTNGjs6JAEGVjs6IUcywio6mCNlMrp7xhUu4,509
15
15
  ledgered/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- ledgered-0.6.4.dev2.dist-info/LICENSE,sha256=rcYmKw35vfzxANXv5w2DgsSVXV8LXcOnTDo6lslFYp0,1063
17
- ledgered-0.6.4.dev2.dist-info/METADATA,sha256=GviDjmfnin05RoZ8RvjRmdZLyutS9n5BLWJBBI5BrFg,2956
18
- ledgered-0.6.4.dev2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
19
- ledgered-0.6.4.dev2.dist-info/entry_points.txt,sha256=absOELBtJLqnlB9NdfOQCh1RLDPVbCNgnPXX8fSUw_8,100
20
- ledgered-0.6.4.dev2.dist-info/top_level.txt,sha256=LWTGn6fYa3YI2253y1orMdCyI1DcSMp86wOJ-rj_RQE,9
21
- ledgered-0.6.4.dev2.dist-info/RECORD,,
16
+ ledgered-0.7.1.dev2.dist-info/LICENSE,sha256=rcYmKw35vfzxANXv5w2DgsSVXV8LXcOnTDo6lslFYp0,1063
17
+ ledgered-0.7.1.dev2.dist-info/METADATA,sha256=_ljLlWj2ZJvAVyltZWrI1UjAWe0U12J7K_o2PlU_C3w,2950
18
+ ledgered-0.7.1.dev2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
19
+ ledgered-0.7.1.dev2.dist-info/entry_points.txt,sha256=absOELBtJLqnlB9NdfOQCh1RLDPVbCNgnPXX8fSUw_8,100
20
+ ledgered-0.7.1.dev2.dist-info/top_level.txt,sha256=LWTGn6fYa3YI2253y1orMdCyI1DcSMp86wOJ-rj_RQE,9
21
+ ledgered-0.7.1.dev2.dist-info/RECORD,,