]> git.phdru.name Git - bookmarks_db.git/commitdiff
Replaced os.stat().st_X with os.path.getX() calls.
authorOleg Broytman <phd@phdru.name>
Sun, 19 Sep 2004 21:17:05 +0000 (21:17 +0000)
committerOleg Broytman <phd@phdru.name>
Sun, 19 Sep 2004 21:17:05 +0000 (21:17 +0000)
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@40 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23

Robots/bkmk_rsimple.py
bkmk2db.py

index e2f4dadc1358ecee16a37be3709ca007d75d4a1f..0d6c04409756be02fa161257b71729b68c2bd740 100644 (file)
@@ -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
index 3f2f25a77d30bdf0db9560348d7b605ccb8a3148..1e652828692665bfeb64ae242bdb0ca0f9774dbd 100755 (executable)
@@ -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)