@@ -125,15 +125,15 @@ def do_project_export_download(self) -> None:
125125assert data is not None
126126sys .stdout .buffer .write (data )
127127
128- except Exception as e :
128+ except Exception as e :# pragma: no cover, cli.die is unit-tested
129129cli .die ("Impossible to download the export" ,e )
130130
131131def do_create (self )-> gitlab .base .RESTObject :
132132if TYPE_CHECKING :
133133assert isinstance (self .mgr ,gitlab .mixins .CreateMixin )
134134try :
135135result = self .mgr .create (self .args )
136- except Exception as e :
136+ except Exception as e :# pragma: no cover, cli.die is unit-tested
137137cli .die ("Impossible to create object" ,e )
138138return result
139139
@@ -144,15 +144,15 @@ def do_list(
144144assert isinstance (self .mgr ,gitlab .mixins .ListMixin )
145145try :
146146result = self .mgr .list (** self .args )
147- except Exception as e :
147+ except Exception as e :# pragma: no cover, cli.die is unit-tested
148148cli .die ("Impossible to list objects" ,e )
149149return result
150150
151151def do_get (self )-> Optional [gitlab .base .RESTObject ]:
152152if isinstance (self .mgr ,gitlab .mixins .GetWithoutIdMixin ):
153153try :
154154result = self .mgr .get (id = None ,** self .args )
155- except Exception as e :
155+ except Exception as e :# pragma: no cover, cli.die is unit-tested
156156cli .die ("Impossible to get object" ,e )
157157return result
158158
@@ -163,7 +163,7 @@ def do_get(self) -> Optional[gitlab.base.RESTObject]:
163163id = self .args .pop (self .cls ._id_attr )
164164try :
165165result = self .mgr .get (id ,lazy = False ,** self .args )
166- except Exception as e :
166+ except Exception as e :# pragma: no cover, cli.die is unit-tested
167167cli .die ("Impossible to get object" ,e )
168168return result
169169
@@ -174,7 +174,7 @@ def do_delete(self) -> None:
174174id = self .args .pop (self .cls ._id_attr )
175175try :
176176self .mgr .delete (id ,** self .args )
177- except Exception as e :
177+ except Exception as e :# pragma: no cover, cli.die is unit-tested
178178cli .die ("Impossible to destroy object" ,e )
179179
180180def do_update (self )-> Dict [str ,Any ]:
@@ -189,7 +189,7 @@ def do_update(self) -> Dict[str, Any]:
189189
190190try :
191191result = self .mgr .update (id ,self .args )
192- except Exception as e :
192+ except Exception as e :# pragma: no cover, cli.die is unit-tested
193193cli .die ("Impossible to update object" ,e )
194194return result
195195