Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Prevent BaseException.message DeprecationWarning. #19

wants to merge 1 commit into from

1 participant


In, I changed from ie.message to using ie.args[0] to get the error message, so it will not throw DeprecationWarning at the beginning when we start warp.

KnP KnP: change from using the BaseException.message to BaseException.arg…
…s[0] in to prevent deprecation warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 21, 2012
  1. KnP: change from using the BaseException.message to BaseException.arg…

    KnP authored
    …s[0] in to prevent deprecation warning
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 6 deletions.
  1. +7 −6 warp/
13 warp/
@@ -13,12 +13,13 @@ def getNode(name):
leaf = bits[-1]
- return getattr(__import__("nodes.%s" % ".".join(bits),
- fromlist=[leaf]),
+ return getattr(__import__("nodes.%s" % ".".join(bits),
+ fromlist=[leaf]),
leaf, None)
except ImportError, ie:
# Hrgh
- if ie.message.startswith("No module named"):
+ #if ie.message.startswith("No module named"):
+ if ie.args[0].startswith("No module named"):
return None
@@ -34,7 +35,7 @@ def getCrudNode(crudClass):
# XXX WHAT - God, what *should* this do??
return sys.modules[crudClass.__module__]
def renderTemplateObj(request, template, **kw):
if kw.pop("return_unicode", False): renderFunc = template.render_unicode
@@ -64,7 +65,7 @@ def getLocalTemplatePath(request, filename):
def renderLocalTemplate(request, filename, **kw):
- return renderTemplate(request,
+ return renderTemplate(request,
getLocalTemplatePath(request, filename),
@@ -82,7 +83,7 @@ def url(node, facet="index", args=(), query=()):
if query:
u = "%s?%s" % (u, urllib.urlencode(query))
return u
def link(label, node, facet="index", args=(), query=(), **attrs):
attrs['href'] = url(node, facet, args, query)
Something went wrong with that request. Please try again.