[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r24084: {arm} Fixing off-by-one issue with the displayed line numbers for (arm/trunk/src/interface)



Author: atagar
Date: 2011-01-15 20:15:20 +0000 (Sat, 15 Jan 2011)
New Revision: 24084

Modified:
   arm/trunk/src/interface/controller.py
Log:
Fixing off-by-one issue with the displayed line numbers for torrc errors (caught by Sjon)



Modified: arm/trunk/src/interface/controller.py
===================================================================
--- arm/trunk/src/interface/controller.py	2011-01-15 20:05:23 UTC (rev 24083)
+++ arm/trunk/src/interface/controller.py	2011-01-15 20:15:20 UTC (rev 24084)
@@ -472,10 +472,10 @@
     
     for lineNum, issue, msg in corrections:
       if issue == torConfig.VAL_DUPLICATE:
-        duplicateOptions.append("%s (line %i)" % (msg, lineNum))
+        duplicateOptions.append("%s (line %i)" % (msg, lineNum + 1))
       elif issue == torConfig.VAL_IS_DEFAULT:
-        defaultOptions.append("%s (line %i)" % (msg, lineNum))
-      elif issue == torConfig.VAL_MISMATCH: mismatchLines.append(lineNum)
+        defaultOptions.append("%s (line %i)" % (msg, lineNum + 1))
+      elif issue == torConfig.VAL_MISMATCH: mismatchLines.append(lineNum + 1)
       elif issue == torConfig.VAL_MISSING: missingOptions.append(msg)
     
     if duplicateOptions or defaultOptions: