Skip to content

Commit

Permalink
fix: Fix DataSourceAliYun exception_cb signature (canonical#6068)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealFalcon authored Mar 3, 2025
1 parent 9311e06 commit aba3791
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cloudinit/sources/DataSourceAliYun.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def _get_headers(self, url=""):
return {}
return {self.imdsv2_token_put_header: self._api_token}

def _imds_exception_cb(self, msg, exception=None):
def _imds_exception_cb(self, exception=None):
"""Fail quickly on proper AWS if IMDSv2 rejects API token request
Guidance from Amazon is that if IMDSv2 had disabled token requests
Expand All @@ -374,6 +374,7 @@ def _imds_exception_cb(self, msg, exception=None):
"Fatal error while requesting Ecs IMDSv2 API tokens"
)
raise exception
return True


def _is_aliyun():
Expand Down

0 comments on commit aba3791

Please sign in to comment.