Fixed error with aliases composed of functions wrapped in functools.partial.

This commit is contained in:
Ad115 2019-05-07 13:53:00 -05:00
parent b38c477402
commit 2766a9a06e
2 changed files with 24 additions and 1 deletions

23
news/aliases_error.rst Normal file
View file

@ -0,0 +1,23 @@
**Added:**
* <news item>
**Changed:**
* <news item>
**Deprecated:**
* <news item>
**Removed:**
* <news item>
**Fixed:**
* Fixed error with aliases composed of functions wrapped in functools.partial.
**Security:**
* <news item>

View file

@ -609,7 +609,7 @@ class SubprocSpec:
def _cmd_event_name(self): def _cmd_event_name(self):
if callable(self.alias): if callable(self.alias):
return self.alias.__name__ return getattr(self.alias, "__name__", repr(self.alias))
elif self.binary_loc is None: elif self.binary_loc is None:
return "<not-found>" return "<not-found>"
else: else: