diff options
author | alkorgun <alkorgun@gmail.com> | 2013-12-17 21:13:52 +0400 |
---|---|---|
committer | alkorgun <alkorgun@gmail.com> | 2013-12-17 21:13:52 +0400 |
commit | bd8d688c92b84c417f5cb1a9d5430111c43cb27d (patch) | |
tree | 1ea1954dc3252c2c653658e546ff66078733c9b5 | |
parent | 180b1137d5a1b0fe05ca8d5aa99f6e43a25e3777 (diff) |
Debug.py:Debug:validate_flags=False - by default
-rw-r--r-- | xmpp/client.py | 2 | ||||
-rw-r--r-- | xmpp/debug.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmpp/client.py b/xmpp/client.py index a28c818..66806ea 100644 --- a/xmpp/client.py +++ b/xmpp/client.py @@ -126,7 +126,7 @@ class CommonClient: """ Default event handler. To be overriden. """ - print "Event: ", (eventName, args) + print("Event: %s-%s" % (eventName, args)) def isConnected(self): """ diff --git a/xmpp/debug.py b/xmpp/debug.py index 24329dc..e84b4c1 100644 --- a/xmpp/debug.py +++ b/xmpp/debug.py @@ -65,7 +65,7 @@ LINE_FEED = "\n" class Debug: - def __init__(self, active_flags=None, log_file=sys.stderr, prefix="DEBUG: ", sufix="\n", time_stamp=0, flag_show=None, validate_flags=1, welcome= -1): + def __init__(self, active_flags=None, log_file=sys.stderr, prefix="DEBUG: ", sufix="\n", time_stamp=0, flag_show=None, validate_flags=False, welcome=-1): self.debug_flags = [] if welcome == -1: if active_flags and len(active_flags): @@ -78,7 +78,7 @@ class Debug: try: self._fh = open(log_file, "w") except Exception: - print "ERROR: can open %s for writing." + print("ERROR: can open %s for writing." % log_file) sys.exit(0) else: # assume its a stream type object self._fh = log_file |