From 391f68ebaffbf017768a2ca64b4a2aded8a94e41 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 19 Sep 2004 21:17:05 +0000 Subject: [PATCH] Replaced os.stat().st_X with os.path.getX() calls. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@40 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- Robots/bkmk_rsimple.py | 2 +- bkmk2db.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Robots/bkmk_rsimple.py b/Robots/bkmk_rsimple.py index e2f4dad..0d6c044 100644 --- a/Robots/bkmk_rsimple.py +++ b/Robots/bkmk_rsimple.py @@ -180,7 +180,7 @@ class robot_simple(Robot): def finish_check_url(self, bookmark): # Calculate these attributes even in case of an error if os.path.exists(self.tempfname): - size = str(os.stat(self.tempfname).st_size) + size = str(os.path.getsize(self.tempfname)) if size[-1] == 'L': size = size[:-1] bookmark.size = size diff --git a/bkmk2db.py b/bkmk2db.py index 3f2f25a..1e65282 100755 --- a/bkmk2db.py +++ b/bkmk2db.py @@ -55,7 +55,7 @@ def run(): if show_pbar: try: - size = os.stat(filename).st_size + size = os.path.getsize(filename) except: print filename, ": no such file" sys.exit(1) -- 2.39.5