# HG changeset patch # User Matt Mackall # Date 1197303887 21600 # Node ID 7dd5cf9d1e09476a9414577df863dc164a1e0688 # Parent a9b7e425674f781223b50b5ff1f21128345ac90e demandload: give better diagnostic for call of an unloaded module diff -r a9b7e425674f -r 7dd5cf9d1e09 mercurial/demandimport.py --- a/mercurial/demandimport.py Mon Dec 10 10:24:36 2007 -0600 +++ b/mercurial/demandimport.py Mon Dec 10 10:24:47 2007 -0600 @@ -67,7 +67,7 @@ return "" % self._data[0] return "" % self._data[0] def __call__(self, *args, **kwargs): - raise TypeError("'unloaded module' object is not callable") + raise TypeError("%s object is not callable" % repr(self)) def __getattribute__(self, attr): if attr in ('_data', '_extend', '_load', '_module'): return object.__getattribute__(self, attr)