Changeset 4348


Ignore:
Timestamp:
Apr 20, 2017, 8:57:07 AM (2 years ago)
Author:
Juanma
Message:

ZmdManager? bugfix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-store/trunk/fuentes/python3-lliurex-store.install/usr/share/lliurexstore/plugins/zmdManager.py

    r4347 r4348  
    55import locale
    66import tempfile
    7 import xmlrpc.client as n4d
     7try:
     8        import xmlrpc.client as n4d
     9except ImportError:
     10        raise ImportError('xmlrpc not available. Disabling ZmdManager')
    811import ssl
    912import time
     
    1417                self.dbg=1
    1518                self.zmdPath='/usr/share/zero-center/zmds'
    16                 self.pluginInfo={'install':'zmd','pkginfo':'zmd','remove':'zmd'}
     19                if hasattr(sys,'last_value'):
     20                        #If there's an error at this point it only could be an importError caused by xmlrpc
     21                        self.pluginInfo={}
     22                else:
     23                        self.pluginInfo={'install':'zmd','pkginfo':'zmd','remove':'zmd'}
    1724                self.progress=0
    1825                self.n4dclient=''
     
    150157                        except Exception as e:
    151158                                err=6
    152                                 self._debug((str(e))
     159                                self._debug(str(e))
    153160                        self._debug("Error: "+str(zmdError))
    154161                        self._debug("Result: "+str(zmdResult))
Note: See TracChangeset for help on using the changeset viewer.