Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > c4aaebff5a034775f37cbc49827cf3b9 > files > 8

smart-0.51-17mdv2008.0.src.rpm

--- smart-0.51/smart/fetcher.py~	2006-11-14 11:52:51.000000000 -0500
+++ smart-0.51/smart/fetcher.py	2007-09-09 08:30:25.359165096 -0400
@@ -1759,15 +1759,16 @@
             status, output = ssh.ssh("stat -c '%%Y %%s' %s" % url.path)
             if status == 0:
                 tokens = output.split()
-                try:
-                    mtime = int(tokens[0])
-                    total = int(tokens[1])
-                except ValueError:
-                    if size:
-                        total = size
-                else:
-                    if size and size != total:
-                        raise Error, _("Server reports unexpected size")
+                if len(tokens) >= 2:
+                    try:
+                        mtime = int(tokens[0])
+                        total = int(tokens[1])
+                    except ValueError:
+                        if size:
+                            total = size
+                    else:
+                        if size and size != total:
+                            raise Error, _("Server reports unexpected size")
             elif size:
                 total = size