summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-04-07 18:33:23 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-04-07 18:35:53 +0200
commit2d825463434154898a990eda4e59262f5814198a (patch)
tree24c14ba80875c863cf3726ecbf154bb9df20262d
parent1c616a4f52ef23dd446a8fef739c64ef160558a1 (diff)
downloadpygobject-2d825463434154898a990eda4e59262f5814198a.tar.gz
signalhelper: remove some broken untested code
self.name is never assigned
-rw-r--r--gi/_signalhelper.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/gi/_signalhelper.py b/gi/_signalhelper.py
index c3747ed5..8a1f0a48 100644
--- a/gi/_signalhelper.py
+++ b/gi/_signalhelper.py
@@ -119,11 +119,9 @@ class Signal(str):
def __init__(self, name='', func=None, flags=_gi.SIGNAL_RUN_FIRST,
return_type=None, arg_types=None, doc='', accumulator=None, accu_data=None):
- if func and not name:
- name = func.__name__
- elif callable(name):
+ if func is None and callable(name):
func = name
- name = func.__name__
+
if func and not doc:
doc = func.__doc__
@@ -170,8 +168,7 @@ class Signal(str):
def copy(self, newName=None):
"""Returns a renamed copy of the Signal."""
- if newName is None:
- newName = self.name
+
return type(self)(name=newName, func=self.func, flags=self.flags,
return_type=self.return_type, arg_types=self.arg_types,
doc=self.__doc__, accumulator=self.accumulator, accu_data=self.accu_data)