Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Fix "Unknown error loading Dockerfile information" error
Browse files Browse the repository at this point in the history
`ImageDistGitRepo.org_image_name,org_version,org_release` should be
declared before calling the constructor of the base class. This is
because the constructor of the base class may call `clone()` method to
set those fields internally.
  • Loading branch information
vfreex committed Sep 21, 2022
1 parent 6816629 commit f6ca9d8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions doozerlib/distgit.py
Expand Up @@ -416,6 +416,9 @@ class ImageDistGitRepo(DistGitRepo):

def __init__(self, metadata, autoclone=True,
source_modifier_factory=SourceModifierFactory()):
self.org_image_name = None
self.org_version = None
self.org_release = None
super(ImageDistGitRepo, self).__init__(metadata, autoclone=autoclone)
self.build_lock = Lock()
self.build_lock.acquire()
Expand All @@ -424,10 +427,6 @@ def __init__(self, metadata, autoclone=True,
self.logger: logging.Logger = metadata.logger
self.source_modifier_factory = source_modifier_factory

self.org_image_name = None
self.org_version = None
self.org_release = None

def clone(self, distgits_root_dir, distgit_branch):
super(ImageDistGitRepo, self).clone(distgits_root_dir, distgit_branch)
self._read_master_data()
Expand Down

0 comments on commit f6ca9d8

Please sign in to comment.