Commit a6826079 authored by Oskar Roesler's avatar Oskar Roesler Committed by Oskar Roesler
Browse files

Fix all as package arg

parent 477c2300
......@@ -29,7 +29,7 @@ class Pull(Routines):
def pull(self):
if self.package == "all":
t = ThreadPoolExecutor(max_workers=(os.cpu_count()))
for folder in os.listdir("./packages"):
for folder in os.listdir(self.packages_path):
t.submit(Pull(folder, self.verbosity, self.output).pull)
else:
repo = Repo(path=self.repos_path)
......
......@@ -49,7 +49,7 @@ class Packages(Routines):
def build(self):
if self.package == "all":
for folder in os.listdir("./packages"):
for folder in os.listdir(self.packages_path):
Packages(folder, self.verbosity, self.output).makepkg()
else:
self.makepkg()
......@@ -83,7 +83,7 @@ class Packages(Routines):
if self.package == "all":
os.remove(self.FAILED_FILE)
os.mknod(self.FAILED_FILE)
for folder in os.listdir("./packages"):
for folder in os.listdir(self.packages_path):
with open(self.SUCCESS_FILE, "r") as fobj:
if folder in fobj.read():
pass
......
......@@ -22,10 +22,12 @@ class Routines:
self.cache_path = os.path.join(Routines.CACHE_ROOT, 'ros-aur-helper')
self.check_and_create_path(self.config_path)
self.check_and_create_path(self.cache_path)
self.packages_path = os.path.join(self.cache_path, 'packages')
self.check_and_create_path(self.packages_path)
if package:
self.package = package
self.repos_path = os.path.join(
self.cache_path, "packages", self.package)
self.pkgrepo_path = os.path.join(
self.packages_path, self.package)
config = self.get_config()
self.gh = Github(config['CI']['GH_OAUTH_TOKEN'])
self.gh_organization_name = config['CI']['GH_ORGANIZATION']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment