mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Replace exec() to getattr()
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
9f1b0920ca
commit
e5eb0e7b0d
1 changed files with 2 additions and 2 deletions
|
@ -41,9 +41,9 @@ class RepoInit:
|
|||
|
||||
def fetch(self):
|
||||
if self.repo in self.meta.default_repositories:
|
||||
exec(f"self._init_{self.repo}()")
|
||||
getattr(self, f"_init_{self.repo}")()
|
||||
else:
|
||||
exec("self._init_custom()")
|
||||
self._init_custom()
|
||||
self.lib = self.meta.lib_path + f"{self.repo}_repo/PACKAGES.TXT"
|
||||
PACKAGES_TXT = Utils().read_file(self.lib)
|
||||
return PACKAGES_TXT, self.mirror
|
||||
|
|
Loading…
Reference in a new issue