]> err.no Git - dak/commitdiff
Drop utils.str_isnum() and use string's .isdigit() method instead.
authorJames Troup <james@nocrew.org>
Mon, 22 May 2006 00:22:57 +0000 (19:22 -0500)
committerJames Troup <james@nocrew.org>
Mon, 22 May 2006 00:22:57 +0000 (19:22 -0500)
ChangeLog
dak/process_new.py
dak/rm.py
daklib/utils.py

index 905a4162a3580b49b081d9f1ec8a6b068377f1b1..d1ea513d34e34c22d210fb5553dfc2e54ae67921 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-05-21  James Troup  <james@nocrew.org>
+
+       * dak/rm.py (main): use string .isdigit() rather than
+       utils.str_isnum().
+       * dak/process_new.py (edit_overrides): likewise.
+
+       * daklib/utils.py (str_isnum): removed accordingly.  Also drop
+       string import.
+
 2006-05-21  James Troup  <james@nocrew.org>
 
        * dak/check_archive.py (check_indices_files_exist): use list
index 094649a55da989e6815611679d1f30a1b0afeb02..3a1074c49202e7a5ce87373461fabcf83f6e6fb9 100755 (executable)
@@ -517,7 +517,7 @@ def edit_overrides (new):
         got_answer = 0
         while not got_answer:
             answer = daklib.utils.our_raw_input(prompt)
-            if not daklib.utils.str_isnum(answer):
+            if not answer.isdigit():
                 answer = answer[:1].upper()
             if answer == "E" or answer == "D":
                 got_answer = 1
index 253110a95780dce6ad3a8bc7545d5b71c0b05cf3..61b82a40fe968d0cdcc2772d7e2d4909e655264b 100755 (executable)
--- a/dak/rm.py
+++ b/dak/rm.py
@@ -282,7 +282,7 @@ def main ():
     #
     carbon_copy = []
     for copy_to in daklib.utils.split_args(Options.get("Carbon-Copy")):
-        if daklib.utils.str_isnum(copy_to):
+        if copy_to.isdigit():
             carbon_copy.append(copy_to + "@" + Cnf["Dinstall::BugServer"])
         elif copy_to == 'package':
             for package in arguments:
index 1e182958e3f7a06ae161f3a1f1abc710cd9820c8..83b507a89062504b43840c51d257ea908757d82a 100644 (file)
@@ -22,7 +22,7 @@
 ################################################################################
 
 import codecs, commands, email.Header, os, pwd, re, select, socket, shutil, \
-       string, sys, tempfile, traceback
+       sys, tempfile, traceback
 import apt_pkg
 import database
 
@@ -97,14 +97,6 @@ def our_raw_input(prompt=""):
 
 ################################################################################
 
-def str_isnum (s):
-    for c in s:
-        if c not in string.digits:
-            return 0
-    return 1
-
-################################################################################
-
 def extract_component_from_section(section):
     component = ""