summaryrefslogtreecommitdiff
path: root/include_server/include_analyzer.py
diff options
context:
space:
mode:
Diffstat (limited to 'include_server/include_analyzer.py')
-rwxr-xr-xinclude_server/include_analyzer.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/include_server/include_analyzer.py b/include_server/include_analyzer.py
index 450b593..b284bbd 100755
--- a/include_server/include_analyzer.py
+++ b/include_server/include_analyzer.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python2.4
+#! /usr/bin/env python3
# Copyright 2007 Google Inc.
#
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
-
+
"""The skeleton for an include analyzer.
This module defines the basic caches and helper functions for an
@@ -139,7 +139,7 @@ class IncludeAnalyzer(object):
os.path.join(currdir, fpath),
self.currdir_idx,
self.client_root_keeper.client_root)
-
+
closure = self.RunAlgorithm(fpath_resolved_pair, fpath_real)
return closure
@@ -194,7 +194,7 @@ class IncludeAnalyzer(object):
def DoStatResetTriggers(self):
"""Reset stat caches if a glob evaluates differently from earlier.
-
+
More precisely, if a path of a glob comes in or out of existence or has a
new stamp, then reset stat caches."""
@@ -233,8 +233,8 @@ class IncludeAnalyzer(object):
def DoCompilationCommand(self, cmd, currdir, client_root_keeper):
"""Parse and and process the command; then gather files and links."""
-
- self.translation_unit = "unknown translation unit" # don't know yet
+
+ self.translation_unit = "unknown translation unit" # don't know yet
# Any relative paths in the globs in the --stat_reset_trigger argument
# must be evaluated relative to the include server's original working
@@ -346,7 +346,7 @@ class IncludeAnalyzer(object):
where searchdir_i is an absolute path. realpath_idx is a realpath
index corresponding to a single #include (more exactly, it's the
index of the path that the #include resolves to).
-
+
This include closure calculation omits any system header files,
that is, header files found in a systemdir (recall systemdirs are
those searchdirs that are built into the preprocessor, such as
@@ -396,7 +396,7 @@ class IncludeAnalyzer(object):
This method to be overridden by derived class.
"""
- raise Exception, "RunAlgorithm not implemented."
+ raise Exception("RunAlgorithm not implemented.")
def ClearStatCaches(self):
"""Clear caches used for, or dependent on, stats."""