deskbar-applet r1839 - in trunk: . deskbar/handlers
- From: sebp svn gnome org
- To: svn-commits-list gnome org
- Subject: deskbar-applet r1839 - in trunk: . deskbar/handlers
- Date: Sun, 13 Jan 2008 11:50:55 +0000 (GMT)
Author: sebp
Date: Sun Jan 13 11:50:55 2008
New Revision: 1839
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=1839&view=rev
Log:
Fixed bug #509058: list index out of range in tomboy.py
Modified:
trunk/ChangeLog
trunk/deskbar/handlers/tomboy.py
Modified: trunk/deskbar/handlers/tomboy.py
==============================================================================
--- trunk/deskbar/handlers/tomboy.py (original)
+++ trunk/deskbar/handlers/tomboy.py Sun Jan 13 11:50:55 2008
@@ -203,10 +203,14 @@
command.close()
line_regexp = re.compile( 'Version \d\.\d\.\d', re.IGNORECASE )
- version_line = line_regexp.findall( read )[0].strip()
- number_regexp = re.compile( '\d\.\d\.\d' )
- version = number_regexp.findall( version_line )[0]
- return version
+ results_list = line_regexp.findall( read )
+ if len(results_list) == 0:
+ return '0.0.0'
+ else:
+ version_line = results_list[0].strip()
+ number_regexp = re.compile( '\d\.\d\.\d' )
+ version = number_regexp.findall( version_line )[0]
+ return version
# Check if version is correct
def tomboy_correct_version():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]