[elbe-devel] [PATCH v2 20/27] projectmanager: fix log deletion

Bastian Germann bage at linutronix.de
Thu Sep 24 18:48:05 CEST 2020


Am 24.09.20 um 16:56 schrieb Torben Hohn:
> Fix ValueError because unbuffered text I/O is not possible on py3.
> 
> The code does not write anything. Use binary mode.
> 
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>

Reviewed-by: Bastian Germann <bage at linutronix.de>

> ---
>  elbepack/projectmanager.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
> index 096b136e6..7f5cf9cfc 100644
> --- a/elbepack/projectmanager.py
> +++ b/elbepack/projectmanager.py
> @@ -496,7 +496,7 @@ class ProjectManager(object):
>  
>      def rm_log(self, userid):
>          ep = self._get_current_project(userid)
> -        with open(os.path.join(ep.builddir, 'log.txt'), 'w', 0):
> +        with open(os.path.join(ep.builddir, 'log.txt'), 'wb', 0):
>              pass
>  
>      def add_deb_package(self, userid, filename):
> 


More information about the elbe-devel mailing list