@@ -36,6 +36,7 @@ class Context:
3636 def __init__ (
3737 self ,
3838 changes : str | deb822 .Changes | None = None ,
39+ profile : dict | None = None ,
3940 debian_changelog : str | changelog .Changelog | None = None ,
4041 launchpad_handle : Launchpad | None = None ,
4142 source_dir : str | None = None ,
@@ -58,6 +59,10 @@ def __init__(
5859 elif changes is not None :
5960 raise ValueError ("invalid type for changes" )
6061
62+ self ._profile : dict | None = None
63+ if profile is not None :
64+ self ._profile = profile
65+
6166 self ._changelog : changelog .Changelog | None = None
6267 if isinstance (debian_changelog , str ):
6368 with open (debian_changelog , "r" ) as f :
@@ -83,6 +88,14 @@ def changes(self) -> deb822.Changes:
8388 assert self ._changes is not None
8489
8590 return self ._changes
91+
92+ @property
93+ def profile (self ) -> dict :
94+ if not self ._profile :
95+ raise MissingContextException ("missing context for upload profile" )
96+ assert self ._profile is not None
97+
98+ return self ._profile
8699
87100 def changelog_entry_by_index (self , index : int ) -> changelog .ChangeBlock :
88101 if not self ._changelog :
0 commit comments