tokenika / eosfactory

Python-based EOS smart-contract development & testing framework
http://eosfactory.io/
Other
243 stars 62 forks source link

WalletDoesNotExistError does not have msg_template field #132

Closed ryanleecode closed 5 years ago

ryanleecode commented 5 years ago

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

stefanzarembinski commented 5 years ago

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:

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

stefanzarembinski commented 5 years ago
Thank you for your contribution. We include it to the next edition of EOSFactory.