Skip to content

Instantly share code, notes, and snippets.

@hassek
Created February 15, 2012 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hassek/1837248 to your computer and use it in GitHub Desktop.
Save hassek/1837248 to your computer and use it in GitHub Desktop.
def get_status(self):
status = self.NOT_AVAILABLE
try:
status = getattr(self, 'get_%s_status' % self.shipper.lower())
except Exception, exc:
logging.warning('caught tracking exception with %s %s: %s' % (self.shipper, self.number, exc))
return status
def get_redirect_url(self):
return getattr(self, 'get_%s_redirect_url' % self.shipper.lower(), '')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment