MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / __init__

Method __init__

src/ext/makerbot_driver/errors.py:165–172  ·  view source on GitHub ↗
(self, response_code)

Source from the content-addressed store, hash-verified

163 if the user replaces or reseats the SD card.
164 """
165 def __init__(self, response_code):
166 self.response_code = response_code
167 self.response_code_string = 'RESPONSE_CODE_NOT_RECOGNIZED'
168 #Do a reverse lookup
169 for key, val in sd_error_dict.items():
170 if val == response_code:
171 self.response_code_string = key
172 break
173
174 def __str__(self):
175 return self.response_code_string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected