From: Oleg Broytman Date: Sun, 19 Sep 2004 21:17:05 +0000 (+0000) Subject: Replaced os.stat().st_X with os.path.getX() calls. X-Git-Tag: v4.5.3~336 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;ds=sidebyside;h=391f68ebaffbf017768a2ca64b4a2aded8a94e41;p=bookmarks_db.git 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 --- 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)