[elbe-devel] [PATCH 3/4] updated: Don't catch ImportError for spyne

Torben Hohn torben.hohn at linutronix.de
Wed Oct 28 15:00:03 CET 2020


On Fri, Oct 02, 2020 at 07:46:19PM +0200, bage at linutronix.de wrote:
> From: Bastian Germann <bage at linutronix.de>
> 

the subject is wrong.

this is not updated, its daemons: or soap:

then 

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


> spyne is in the Debian package's Depends, so it must be available when
> updated is install as Debian package.
> 
> Signed-off-by: Bastian Germann <bage at linutronix.de>
> ---
>  elbepack/daemons/soap/__init__.py | 13 ++++---------
>  elbepack/daemons/soap/esoap.py    | 15 +++++----------
>  2 files changed, 9 insertions(+), 19 deletions(-)
> 
> diff --git a/elbepack/daemons/soap/__init__.py b/elbepack/daemons/soap/__init__.py
> index ebe73f235..9bcabab82 100644
> --- a/elbepack/daemons/soap/__init__.py
> +++ b/elbepack/daemons/soap/__init__.py
> @@ -11,19 +11,14 @@ import warnings
>  from beaker.middleware import SessionMiddleware
>  from cherrypy.process.plugins import SimplePlugin
>  
> +from spyne import Application
> +from spyne.protocol.soap import Soap11
> +from spyne.server.wsgi import WsgiApplication
> +
>  from elbepack.projectmanager import ProjectManager
>  
>  from .esoap import ESoap
>  
> -try:
> -    from spyne import Application
> -    from spyne.protocol.soap import Soap11
> -    from spyne.server.wsgi import WsgiApplication
> -except ImportError as e:
> -    print("failed to import spyne", file=sys.stderr)
> -    print("please install python(3)-spyne", file=sys.stderr)
> -    sys.exit(20)
> -
>  
>  logging.getLogger('spyne').setLevel(logging.INFO)
>  
> diff --git a/elbepack/daemons/soap/esoap.py b/elbepack/daemons/soap/esoap.py
> index c64e6ba04..c4502c494 100644
> --- a/elbepack/daemons/soap/esoap.py
> +++ b/elbepack/daemons/soap/esoap.py
> @@ -14,6 +14,11 @@ import sys
>  
>  from tempfile import NamedTemporaryFile
>  
> +from spyne.service import ServiceBase
> +from spyne.decorator import rpc
> +from spyne.model.primitive import String, Boolean, Integer
> +from spyne.model.complex import Array
> +
>  from elbepack.shellhelper import system, command_out
>  from elbepack.version import elbe_version, is_devel
>  from elbepack.elbexml import ValidationMode
> @@ -23,16 +28,6 @@ from .faults import soap_faults
>  from .datatypes import SoapProject, SoapFile, SoapCmdReply
>  from .authentication import authenticated_admin, authenticated_uid
>  
> -try:
> -    from spyne.service import ServiceBase
> -    from spyne.decorator import rpc
> -    from spyne.model.primitive import String, Boolean, Integer
> -    from spyne.model.complex import Array
> -except ImportError as e:
> -    print("failed to import spyne", file=sys.stderr)
> -    print("please install python(3)-spyne", file=sys.stderr)
> -    sys.exit(20)
> -
>  
>  class ESoap (ServiceBase):
>  
> -- 
> 2.28.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