misc/*: remove RuntimeError too
authorBrian Warner <warner@lothar.com>
Mon, 23 Feb 2009 00:34:01 +0000 (17:34 -0700)
committerBrian Warner <warner@lothar.com>
Mon, 23 Feb 2009 00:34:01 +0000 (17:34 -0700)
misc/get-version.py
misc/logtool.py
misc/sizes.py

index a9a637a7c1ef4061808a7f490b972bc53a05bd61..a3ef5d11ae388f2152ed6f6391bc6c9338af4412 100644 (file)
@@ -28,7 +28,7 @@ def get_version():
         if mo:
             verstr = mo.group(1)
         else:
-            raise RuntimeError("if version.py exists, it must be well-formed")
+            raise ValueError("if version.py exists, it must be well-formed")
 
     return verstr
 
index 16ec40e6ae9b28b3b95b9a7789664a6bd33f936b..9f0beeb5069b02bdb867b8babd5962c03958d32f 100644 (file)
@@ -31,7 +31,7 @@ class Options(usage.Options):
                 fn = os.path.join(target, "logport.furl")
                 self.target_furl = open(fn, "r").read().strip()
             else:
-                raise RuntimeError("Can't use tail target: %s" % target)
+                raise ValueError("Can't use tail target: %s" % target)
         elif mode == "dump":
             self.dumpfile = args[0]
 
index b55d94911a08cb296e49625e3d3a018e47a3aef3..d9c230a3a6dd9f61c3d1e85d3a22d64d26acc656 100644 (file)
@@ -114,7 +114,7 @@ class Sizes:
             
 
         else:
-            raise RuntimeError("unknown mode '%s" % mode)
+            raise ValueError("unknown mode '%s" % mode)
 
         self.storage_overhead = self.share_storage_overhead * num_shares
         self.storage_overhead_percentage = 100.0 * self.storage_overhead / file_size