r81377 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81376‎ | r81377 | r81378 >
Date:05:41, 2 February 2011
Author:diederik
Status:deferred
Tags:
Comment:
Removed repeated statement.
Modified paths:
  • /trunk/tools/editor_trends/utils/file_utils.py (modified) (history)

Diff [purge]

Index: trunk/tools/editor_trends/utils/file_utils.py
@@ -55,6 +55,18 @@
5656 #RE_ERROR_LOCATION = re.compile('\d+')
5757 #RE_NUMERIC_CHARACTER = re.compile('&#?\w+;')
5858
 59+def read_unicode_text(fh):
 60+ data = []
 61+ try:
 62+ for line in fh:
 63+ line = line.strip()
 64+ data.append(line)
 65+ except UnicodeDecodeError, e:
 66+ print e
 67+
 68+ return data
 69+
 70+
5971 def check_if_process_is_running(pid):
6072 try:
6173 if settings.OS == 'Windows':
@@ -240,7 +252,6 @@
241253 assert isinstance(mod_rem, datetime.datetime), '''The mod_rem variable should
242254 be an instane of datetime.datetime.'''
243255 path = os.path.join(location, filename)
244 - mod_rem = mod_rem.timetuple()
245256 mod_rem = int(time.mktime(mod_rem.timetuple()))
246257 os.utime(path, (mod_rem, mod_rem))
247258 #sraise exceptions.NotYetImplementedError(set_modified_data)

Status & tagging log