Loading installsystems/database.py +2 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ class Database(object): def create(cls, path): arrow("Creating repository database") # check locality if istools.pathtype(path) != "file": if not istools.isfile(path): raise Exception("Database creation must be local") path = os.path.abspath(path) if os.path.exists(path): Loading @@ -42,7 +42,7 @@ class Database(object): def __init__(self, path): # check locality if istools.pathtype(path) != "file": if not istools.isfile(path): raise Exception("Database must be local") self.path = os.path.abspath(path) self.conn = sqlite3.connect(self.path, isolation_level=None) Loading installsystems/image.py +2 −2 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ class SourceImage(Image): Create an empty source image ''' # check local repository if istools.pathtype(path) != "file": if not istools.isfile(path): raise NotImplementedError("SourceImage must be local") # main path parser_path = os.path.join(path, "parser") Loading Loading @@ -100,7 +100,7 @@ class SourceImage(Image): def __init__(self, path): # check local repository if istools.pathtype(path) != "file": if not istools.isfile(path): raise NotImplementedError("SourceImage must be local") Image.__init__(self) self.base_path = path Loading installsystems/repository.py +4 −4 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ class Repository(object): Update last file to current time ''' # check local repository if istools.pathtype(self.config.path) != "file": if not istools.isfile(self.config.path): raise Exception("Repository addition must be local") try: arrow("Updating last file") Loading @@ -109,7 +109,7 @@ class Repository(object): if delete is true, remove original files ''' # check local repository if istools.pathtype(self.config.path) != "file": if not istools.isfile(self.config.path): raise Exception("Repository addition must be local") # cannot add already existant image if self.has(image.name, image.version): Loading Loading @@ -174,7 +174,7 @@ class Repository(object): Delete an image from repository ''' # check local repository if istools.pathtype(self.config.path) != "file": if not istools.isfile(self.config.path): raise Exception("Repository deletion must be local") # get md5 of files related to images (exception is raised if not exists md5s = self.getmd5(name, version) Loading Loading @@ -375,7 +375,7 @@ class RepositoryConfig(object): Set db path ''' # dbpath must be local, sqlite3 requirment if istools.pathtype(value) != "file": if not istools.isfile(value): raise ValueError("Database path must be local") self._dbpath = os.path.abspath(value) Loading Loading
installsystems/database.py +2 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ class Database(object): def create(cls, path): arrow("Creating repository database") # check locality if istools.pathtype(path) != "file": if not istools.isfile(path): raise Exception("Database creation must be local") path = os.path.abspath(path) if os.path.exists(path): Loading @@ -42,7 +42,7 @@ class Database(object): def __init__(self, path): # check locality if istools.pathtype(path) != "file": if not istools.isfile(path): raise Exception("Database must be local") self.path = os.path.abspath(path) self.conn = sqlite3.connect(self.path, isolation_level=None) Loading
installsystems/image.py +2 −2 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ class SourceImage(Image): Create an empty source image ''' # check local repository if istools.pathtype(path) != "file": if not istools.isfile(path): raise NotImplementedError("SourceImage must be local") # main path parser_path = os.path.join(path, "parser") Loading Loading @@ -100,7 +100,7 @@ class SourceImage(Image): def __init__(self, path): # check local repository if istools.pathtype(path) != "file": if not istools.isfile(path): raise NotImplementedError("SourceImage must be local") Image.__init__(self) self.base_path = path Loading
installsystems/repository.py +4 −4 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ class Repository(object): Update last file to current time ''' # check local repository if istools.pathtype(self.config.path) != "file": if not istools.isfile(self.config.path): raise Exception("Repository addition must be local") try: arrow("Updating last file") Loading @@ -109,7 +109,7 @@ class Repository(object): if delete is true, remove original files ''' # check local repository if istools.pathtype(self.config.path) != "file": if not istools.isfile(self.config.path): raise Exception("Repository addition must be local") # cannot add already existant image if self.has(image.name, image.version): Loading Loading @@ -174,7 +174,7 @@ class Repository(object): Delete an image from repository ''' # check local repository if istools.pathtype(self.config.path) != "file": if not istools.isfile(self.config.path): raise Exception("Repository deletion must be local") # get md5 of files related to images (exception is raised if not exists md5s = self.getmd5(name, version) Loading Loading @@ -375,7 +375,7 @@ class RepositoryConfig(object): Set db path ''' # dbpath must be local, sqlite3 requirment if istools.pathtype(value) != "file": if not istools.isfile(value): raise ValueError("Database path must be local") self._dbpath = os.path.abspath(value) Loading