提交 567c91b5 编写于 作者: J James Troup

Drop utils.str_isnum() and use string's .isdigit() method instead.

上级 e2110abd
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
......
......@@ -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
......
......@@ -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:
......
......@@ -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 = ""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册