commands: Add debug output when command is called

This commit is contained in:
Florian Bruhin 2014-01-19 18:43:34 +01:00
parent 9f9f5c41f7
commit 8ca98da6c4

View File

@ -1,5 +1,7 @@
import inspect
import sys
import logging
from PyQt5.QtCore import QObject, pyqtSignal
import inspect, sys
cmd_dict = {}
@ -53,6 +55,8 @@ class Command(QObject):
raise TypeError("Invalid argument count!")
def run(self, argv=None):
logging.debug("Cmd called: {}({})".format(self.__class__.__name__,
", ".join(argv) if argv else ''))
if not self.signal:
raise NotImplementedError
# some sane defaults