Changeset 4019 for lliurex-store


Ignore:
Timestamp:
Mar 22, 2017, 10:01:51 AM (3 years ago)
Author:
Juanma
Message:

Added unknown error to get_status method

File:
1 edited

Legend:

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

    r3852 r4019  
    321321                        errorFile=open('/usr/share/lliurex-store/files/error.json').read()
    322322                        errorCodes=json.loads(errorFile)
    323                         result['msg']=errorCodes[str(result['status'])]
     323                        errCode=str(result['status'])
     324                        if errCode in errorCodes:
     325                                result['msg']=errorCodes[errCode]
     326                        else:
     327                                result['msg']=u"Unknown error"
    324328                self.lock.release()
    325329                return(result)
Note: See TracChangeset for help on using the changeset viewer.