[elbe-devel] [RFC PATCH 5/6] filesystem: Change os.errno to errno module

Torben Hohn torben.hohn at linutronix.de
Wed Apr 15 16:44:27 CEST 2020


On Tue, Apr 07, 2020 at 03:32:45PM -0400, Olivier Dion wrote:
> errno is in its own module and not in os since python3.
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>

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

> ---
>  elbepack/filesystem.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/elbepack/filesystem.py b/elbepack/filesystem.py
> index 3dac75ff..a77c8dba 100644
> --- a/elbepack/filesystem.py
> +++ b/elbepack/filesystem.py
> @@ -8,6 +8,7 @@ from __future__ import print_function
>  
>  import os
>  import shutil
> +import errno
>  
>  from glob import glob
>  from tempfile import mkdtemp
> @@ -144,7 +145,7 @@ class Filesystem(object):
>          try:
>              os.symlink(src, self.fname(path))
>          except OSError as e:
> -            if e.errno != os.errno.EEXIST:
> +            if e.errno != errno.EEXIST:
>                  raise
>              elif not allow_exists:
>                  raise
> -- 
> 2.26.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