diff --git a/ChangeLog b/ChangeLog index 905a4162a3580b49b081d9f1ec8a6b068377f1b1..d1ea513d34e34c22d210fb5553dfc2e54ae67921 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-05-21 James Troup + + * 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 * dak/check_archive.py (check_indices_files_exist): use list diff --git a/dak/process_new.py b/dak/process_new.py index 094649a55da989e6815611679d1f30a1b0afeb02..3a1074c49202e7a5ce87373461fabcf83f6e6fb9 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -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 diff --git a/dak/rm.py b/dak/rm.py index 253110a95780dce6ad3a8bc7545d5b71c0b05cf3..61b82a40fe968d0cdcc2772d7e2d4909e655264b 100755 --- 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: diff --git a/daklib/utils.py b/daklib/utils.py index 1e182958e3f7a06ae161f3a1f1abc710cd9820c8..83b507a89062504b43840c51d257ea908757d82a 100644 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -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 = ""