From 621f4ca23b1a1befacfb71c85255a19db0d260e1 Mon Sep 17 00:00:00 2001 From: PixelSergey Date: Tue, 8 Mar 2016 20:32:56 +0200 Subject: [PATCH 1/5] Added a debug decorator, use @debug to nicely print function errors --- helpers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/helpers.py b/helpers.py index 8485b2a..4c32e24 100755 --- a/helpers.py +++ b/helpers.py @@ -314,3 +314,13 @@ def array_to_list(array): for a in array: return_list += [a] return return_list + + +#debug wrapper +def debug(func): + def wrap(*args, **kwargs): + try: + func(*args, **kwargs) + except: + print(trace()) + return wrap -- 2.45.2 From fad1ae0f90022aee9d336618dd2c0cc3b8ba95a2 Mon Sep 17 00:00:00 2001 From: Dico200 Date: Sat, 12 Mar 2016 01:00:07 +0100 Subject: [PATCH 2/5] Fixed a return message in blockplacemods.py --- blockplacemods.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blockplacemods.py b/blockplacemods.py index fd7071e..b87c5ee 100644 --- a/blockplacemods.py +++ b/blockplacemods.py @@ -150,7 +150,8 @@ def toggle_command(sender, command, label, args): if arg2 == "clear": if enabled: del values[uuid] - return " &aDisabled " + details[1] + return " &aDisabled " + details[1] + return " &cAlready disabled: " + details[1] if arg2 == "details": return " &aSetting %s:\n &9%s \n&6Accepted arguments: [|clear|details]" % (setting, details[2]) -- 2.45.2 From 286f8751b5d3edcaa2e1f8c22b47f292887c979f Mon Sep 17 00:00:00 2001 From: Dico200 Date: Sat, 12 Mar 2016 01:02:48 +0100 Subject: [PATCH 3/5] Fix tab -.- lol why did it load locally? --- blockplacemods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockplacemods.py b/blockplacemods.py index b87c5ee..8d18699 100644 --- a/blockplacemods.py +++ b/blockplacemods.py @@ -150,7 +150,7 @@ def toggle_command(sender, command, label, args): if arg2 == "clear": if enabled: del values[uuid] - return " &aDisabled " + details[1] + return " &aDisabled " + details[1] return " &cAlready disabled: " + details[1] if arg2 == "details": -- 2.45.2 From c870561f7db96d0ab010e99fdd22699a24e0630b Mon Sep 17 00:00:00 2001 From: psrcek Date: Sat, 26 Mar 2016 21:56:10 +0100 Subject: [PATCH 4/5] removed some unnecesary code The below if statement is always true and the value of timeout_on isn't used before a return statement. timeout_on = False if timeout_on == False: --- damnspam.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/damnspam.py b/damnspam.py index 6a4c2b3..af800af 100644 --- a/damnspam.py +++ b/damnspam.py @@ -47,8 +47,6 @@ def on_dammnspam_command(sender, command, label, args): timeout_on = round(float(timeout_on), 2) timeout_off = timeout_on if 60 >= timeout_on <= -2 or timeout_on == 0: - timeout_on = False - if timeout_on == False: msg(sender, "&cThe timeout must be within 0-60 or -1.") return True except ValueError: -- 2.45.2 From 46f1564af03a35c006448df77b1207f516592489 Mon Sep 17 00:00:00 2001 From: Pepich Date: Mon, 11 Apr 2016 15:18:59 +0200 Subject: [PATCH 5/5] Fixed indentation error ll 39-41 --- damnspam.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/damnspam.py b/damnspam.py index 6a4c2b3..83dfb5f 100644 --- a/damnspam.py +++ b/damnspam.py @@ -36,9 +36,9 @@ def on_dammnspam_command(sender, command, label, args): msg(sender, "&c/damnspam &e(Levers only)") return True #Gittestlol - if not is_creative(sender): - msg(sender, "&cYou can only do this in Creative mode.") - return True + if not is_creative(sender): + msg(sender, "&cYou can only do this in Creative mode.") + return True # /damnspam if len(args) == 1: -- 2.45.2