tokenika / eosfactory

Python-based EOS smart-contract development & testing framework

Home Page:http://eosfactory.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WalletDoesNotExistError does not have msg_template field

ryanleecode opened this issue · comments

Ran into this error earlier but it threw an exception saying msg_template doesnt exist. Couldn't find anywhere that references msg_template in the code and pylint is complaining its not defined too. Whats the expected behaviour here?

image

The code is wrong. Thank you for your remark. We will correct the error in the next edition of EOSFactory.

#####################################
if "unknown key" in err_msg:
raise AccountDoesNotExistError(omittable)
elif "Error 3080001: Account using more than allotted RAM" in err_msg:
needs = int(re.search('needs\s(.)\sbytes\shas', err_msg).group(1))
has = int(re.search('bytes\shas\s(.
)\sbytes', err_msg).group(1))
raise LowRamError(needs, needs - has)
elif "transaction executed locally, but may not be" in err_msg:
pass
elif "Wallet already exists" in err_msg:
raise WalletAlreadyExistsError(omittable)

elif "Error 3120002: Nonexistent wallet" in err_msg:

raise WalletDoesNotExistError(

WalletDoesNotExistError.msg_template.format(self.name))

elif "Error 3120002: Nonexistent wallet" in err_msg: # correction
    raise WalletDoesNotExistError(omittable) # correction
elif "Invalid wallet password" in err_msg:
    raise InvalidPasswordError(omittable)
elif "Contract is already running this version of code" in err_msg:
    raise ContractRunningError()
elif "Missing required authority" in err_msg:

#####################################

Thank you for your contribution. We include it to the next edition of EOSFactory.