From 01592e44fa370303cd982565b1170a645b20b98e Mon Sep 17 00:00:00 2001 From: Jack Foltz Date: Sun, 9 Dec 2018 11:13:26 -0500 Subject: [PATCH] Move transform_defaults and fix config inference again --- lib/package.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/package.py b/lib/package.py index aa58ba5..4ceb097 100644 --- a/lib/package.py +++ b/lib/package.py @@ -21,7 +21,9 @@ class Package: self.name = obj # Transform and infer attributes - self.update_from_files() + self.transform_default('config', '.config/' + self.name, 'lain/') + self.transform_default('script', self.name + '.fish', 'scripts/') + self.transform_default('userunit', self.name + '.service', 'lain/.config/systemd/user/') # Install State self.enabled = True @@ -64,11 +66,6 @@ class Package: else: self[prop] = None - def update_from_files(self): - self.transform_default('config', self.name, 'lain/') - self.transform_default('script', self.name + '.fish', 'scripts/') - self.transform_default('userunit', self.name + '.service', 'lain/.config/systemd/user/') - @staticmethod def config_menu(screen, title, packages): items = []