Added error handling for install_profile() if string vs Profile() is given as an argument.

This commit is contained in:
Anton Hvornum 2021-03-14 14:41:13 +01:00
parent 37b1e61828
commit abd15f9ff5
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 2 additions and 1 deletions

View File

@ -363,7 +363,8 @@ class Installer():
return self.pacstrap(*packages)
def install_profile(self, profile):
profile = Profile(self, profile)
if type(profile) == str:
profile = Profile(self, profile)
self.log(f'Installing network profile {profile}', level=LOG_LEVELS.Info)
return profile.install()