Skip to content

Commit

Permalink
find * -name '*.py' | xargs sed -i -r 's,\s+$,,'
Browse files Browse the repository at this point in the history
... my trailing whitespace autoremove vim plugin is constantly editing/autocorrecting files as i work.  as i do not mix cosmetic and functional commits, this is a real annoyance; this patch removes all trailing blanks, once-and-for-all.  ideally, this would be enforced.  as a bonus, the pipeline also fixes [dos] and [noeol] files.

LibTest results unaffected; assumed correct.
  • Loading branch information
C Anthony Risinger committed May 14, 2012
1 parent 9be1397 commit 64eff55
Show file tree
Hide file tree
Showing 485 changed files with 6,232 additions and 6,242 deletions.
2 changes: 1 addition & 1 deletion addons/CountryListBox.py
Expand Up @@ -255,7 +255,7 @@ class CountryListBox(ListBox):
def __init__(self):
ListBox.__init__(self)
self.addCountries()

def addCountries(self):
for countryItem in self.country_list:
self.addItem(countryItem[0], countryItem[1])
Expand Down
18 changes: 9 additions & 9 deletions addons/DeferredHandler.py
Expand Up @@ -4,17 +4,17 @@
@contact: tobi-weber@gmx.de
"""

from pyjamas.Timer import Timer
from pyjamas.Timer import Timer

global deferredHandlers
deferredHandlers = []
global timerIsActive
timerIsActive = False
timerIsActive = False

def add(handler, arguments=[]):
deferredHandlers.append([handler, arguments])
maybeSetDeferredHandlerTimer()

def flushDeferredHandlers():
for i in range(len(deferredHandlers)):
current = deferredHandlers[0]
Expand All @@ -23,17 +23,17 @@ def flushDeferredHandlers():
handler = current[0]
args = current[1]
handler(*args)

def maybeSetDeferredHandlerTimer():
global timerIsActive

if (not timerIsActive) and (not len(deferredHandlers)==0):
Timer(1, onTimer)
timerIsActive = True

def onTimer(t):
global timerIsActive

flushDeferredHandlers()
timerIsActive = False
maybeSetDeferredHandlerTimer()
maybeSetDeferredHandlerTimer()

0 comments on commit 64eff55

Please sign in to comment.