From 94752bdb2b08712db2025c479c36b87c5bc8770c Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Thu, 20 May 2010 14:08:44 +0000 Subject: Convert old-style classes in src/script to new-style classes. --- src/script/scons-time.py | 6 +++--- src/script/sconsign.py | 4 ++-- src/setup.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/script/scons-time.py b/src/script/scons-time.py index 37ee593..3b215f9 100644 --- a/src/script/scons-time.py +++ b/src/script/scons-time.py @@ -112,7 +112,7 @@ def HACK_for_exec(cmd, *args): elif len(args) == 1: exec cmd in args[0] else: exec cmd in args[0], args[1] -class Plotter: +class Plotter(object): def increment_size(self, largest): """ Return the size of each horizontal increment line for a specified @@ -135,7 +135,7 @@ class Plotter: increment = self.increment_size(largest) return ((largest + increment - 1) // increment) * increment -class Line: +class Line(object): def __init__(self, points, type, title, label, comment, fmt="%s %s"): self.points = points self.type = type @@ -309,7 +309,7 @@ def tee_to_file(command, log): -class SConsTimer: +class SConsTimer(object): """ Usage: scons-time SUBCOMMAND [ARGUMENTS] Type "scons-time help SUBCOMMAND" for help on a specific subcommand. diff --git a/src/script/sconsign.py b/src/script/sconsign.py index 075459f..4c726da 100644 --- a/src/script/sconsign.py +++ b/src/script/sconsign.py @@ -201,7 +201,7 @@ def my_import(mname): fp, pathname, description = imp.find_module(mname) return imp.load_module(mname, fp, pathname, description) -class Flagger: +class Flagger(object): default_value = 1 def __setitem__(self, item, value): self.__dict__[item] = value @@ -344,7 +344,7 @@ def printentries(entries, location): print nodeinfo_string(name, entry.ninfo) printfield(name, entry.binfo) -class Do_SConsignDB: +class Do_SConsignDB(object): def __init__(self, dbm_name, dbm): self.dbm_name = dbm_name self.dbm = dbm diff --git a/src/setup.py b/src/setup.py index 3c91757..1e04cb4 100644 --- a/src/setup.py +++ b/src/setup.py @@ -75,7 +75,7 @@ _install_lib = distutils.command.install_lib.install_lib _install_scripts = distutils.command.install_scripts.install_scripts _build_scripts = distutils.command.build_scripts.build_scripts -class _options: +class _options(object): pass Options = _options() -- cgit v0.12