From 0de314205f9925c073566de109464b46737b0527 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 26 Oct 2010 21:16:52 -0500 Subject: pactest: pylint changes for pmfile Signed-off-by: Dan McGee --- test/pacman/pmfile.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'test') diff --git a/test/pacman/pmfile.py b/test/pacman/pmfile.py index ab4aa2c7..ffa4aa7e 100755 --- a/test/pacman/pmfile.py +++ b/test/pacman/pmfile.py @@ -18,8 +18,7 @@ import os -from util import * - +import util class pmfile: """File object @@ -30,8 +29,8 @@ class pmfile: self.root = root filename = os.path.join(self.root, self.name) - self.checksum = getmd5sum(filename) - self.mtime = getmtime(filename) + self.checksum = util.getmd5sum(filename) + self.mtime = util.getmtime(filename) def __str__(self): return "%s (%s / %lu)" % (self.name, self.checksum, self.mtime) @@ -43,12 +42,12 @@ class pmfile: retval = 0 filename = os.path.join(self.root, self.name) - checksum = getmd5sum(filename) - mtime = getmtime(filename) + checksum = util.getmd5sum(filename) + mtime = util.getmtime(filename) - vprint("\tismodified(%s)" % self.name) - vprint("\t\told: %s / %s" % (self.checksum, self.mtime)) - vprint("\t\tnew: %s / %s" % (checksum, mtime)) + util.vprint("\tismodified(%s)" % self.name) + util.vprint("\t\told: %s / %s" % (self.checksum, self.mtime)) + util.vprint("\t\tnew: %s / %s" % (checksum, mtime)) if self.checksum != checksum \ or (self.mtime[1], self.mtime[2]) != (mtime[1], mtime[2]): @@ -62,10 +61,7 @@ class pmfile: filename = os.path.join(self.root, self.name) os.utime(filename, (355, 355)) - self.mtime = getmtime(filename) - vprint("\tmtime reset (%s)" % self.name) + self.mtime = util.getmtime(filename) + util.vprint("\tmtime reset (%s)" % self.name) -if __name__ == "__main__": - f = pmfile("/tmp", "foobar") - print f # vim: set ts=4 sw=4 et: -- cgit v1.2.3-70-g09d2