If locate package is not installed, none of the files nor the updatedb
command are going to be found. So, the os_type var is not declared and
the error happens.
http://code.google.com/p/hntool/source/detail?r=b53a98dc0b
Modified:
/HnTool/modules/filesystems.py
=======================================
--- /HnTool/modules/filesystems.py Sun Aug 22 07:48:58 2010
+++ /HnTool/modules/filesystems.py Wed Dec 1 06:20:03 2010
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- coding: utf-8; indent-tabs-mode: 1 -*-
#
# HnTool rules - filesystems
# Copyright (C) 2009-2010 Hugo Doria <ma...@hugodoria.org>
@@ -47,6 +47,12 @@
check_results['info'].append('%s not found. Please run %s' % \
(locate_database['bsd'], updatedb_command['bsd']))
os_type = 'bsd'
+ else:
+ # It seems that we don't have any locate
+ # database present
+ check_results['info'].append('Could not find locate')
+ return check_results
+
elif os.path.isfile(locate_database['bsd']):
check_results['ok'].append('locate.database found.')
os_type = 'bsd'