svn commit: r241912 - user/crees/rclint

Chris Rees crees at FreeBSD.org
Mon Oct 22 20:17:59 UTC 2012


Author: crees (ports committer)
Date: Mon Oct 22 20:17:58 2012
New Revision: 241912
URL: http://svn.freebsd.org/changeset/base/241912

Log:
  Allow different DATADIR values to be used

Modified:
  user/crees/rclint/rclint.py

Modified: user/crees/rclint/rclint.py
==============================================================================
--- user/crees/rclint/rclint.py	Mon Oct 22 20:04:13 2012	(r241911)
+++ user/crees/rclint/rclint.py	Mon Oct 22 20:17:58 2012	(r241912)
@@ -30,6 +30,8 @@ MAJOR = 0
 MINOR = 0
 MICRO = 0
 
+DATADIR = '.'
+
 import argparse
 import logging
 import re
@@ -38,7 +40,7 @@ import textwrap
 class Db:
     def __init__(self, dbname, language):
         self._contents = []
-        with open('%s.%s' % (dbname, language)) as f:
+        with open('%s/%s.%s' % (DATADIR, dbname, language)) as f:
             logging.debug('Sucking in %s database' % dbname)
             for e in f.readlines():
                 e = e.rstrip('\n')


More information about the svn-src-user mailing list