Add __repr__.

This commit is contained in:
Jelmer Vernooij 2021-03-21 23:07:46 +00:00
parent 42724a74a8
commit c38e32516f
No known key found for this signature in database
GPG key ID: 579C160D4C9E23E8
2 changed files with 6 additions and 0 deletions

View file

@ -507,6 +507,9 @@ class PgBuildExtOutOfDateControlFixer(BuildFixer):
def can_fix(self, problem):
return isinstance(problem, NeedPgBuildExtUpdateControl)
def __repr__(self):
return "%s()" % (type(self).__name__, )
def _fix(self, error, context):
logging.info("Running 'pg_buildext updatecontrol'")
self.session.check_call(["pg_buildext", "updatecontrol"])

View file

@ -598,6 +598,9 @@ class AptResolver(Resolver):
def __str__(self):
return "apt"
def __repr__(self):
return "%s()" % (type(self).__name__, )
@classmethod
def from_session(cls, session):
return cls(AptManager.from_session(session))