[elbe-devel] [PATCH v3 16/52] Remove logpath from project manager and db

Torben Hohn torben.hohn at linutronix.de
Fri Jul 5 10:56:51 CEST 2019


On Thu, Jun 27, 2019 at 02:44:30PM +0200, dion at linutronix.de wrote:
> From: Olivier Dion <dion at linutronix.de>

logging is now done through the logging system, and is the logs
filename is not relevant at this level of the stack.

remove the parameter.

> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>

fixup the changelog and add:

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
>  elbepack/db.py             |  3 +--
>  elbepack/projectmanager.py | 10 ++++------
>  2 files changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/elbepack/db.py b/elbepack/db.py
> index f2333c87..5722cc42 100644
> --- a/elbepack/db.py
> +++ b/elbepack/db.py
> @@ -455,7 +455,6 @@ class ElbeDB(object):
>      def load_project(
>              self,
>              builddir,
> -            logpath=None,
>              url_validation=ValidationMode.CHECK_ALL):
>  
>          # pass exceptions if hook-scripts can't be loaded (they're optional)
> @@ -492,7 +491,7 @@ class ElbeDB(object):
>                  p = s.query(Project). \
>                      filter(Project.builddir == builddir).one()
>  
> -                return ElbeProject(p.builddir, name=p.name, logpath=logpath,
> +                return ElbeProject(p.builddir, name=p.name,
>                                     postbuild_file=postbuild_file,
>                                     presh_file=presh_file,
>                                     postsh_file=postsh_file,
> diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
> index 0e241a66..f8ed894f 100644
> --- a/elbepack/projectmanager.py
> +++ b/elbepack/projectmanager.py
> @@ -108,9 +108,8 @@ class ProjectManager(object):
>                  raise
>  
>              # Open the new project
> -            logpath = path.join(builddir, "log.txt")
> -            ep = self.db.load_project(
> -                builddir, logpath, url_validation=url_validation)
> +            ep = self.db.load_project(builddir,
> +                                      url_validation=url_validation)
>  
>              self.userid2project[userid] = ep
>              self.builddir2userid[builddir] = userid
> @@ -140,9 +139,8 @@ class ProjectManager(object):
>              self._close_current_project(userid)
>  
>              # Load project from the database
> -            logpath = path.join(builddir, "log.txt")
> -            ep = self.db.load_project(
> -                builddir, logpath, url_validation=url_validation)
> +            ep = self.db.load_project(builddir,
> +                                      url_validation=url_validation)
>  
>              # Add project to our dictionaries
>              self.userid2project[userid] = ep
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list