Commit 9ef09bfd authored by Likun Zhang's avatar Likun Zhang
Browse files

Rename folder name from utils to util.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac364@3174 e5f2f494-b856-4b98-b285-d166d9295462
parent 2b67bea2
......@@ -482,8 +482,8 @@ AC_CONFIG_FILES([Makefile
src/lib/cc/tests/Makefile
src/lib/python/Makefile
src/lib/python/isc/Makefile
src/lib/python/isc/utils/Makefile
src/lib/python/isc/utils/tests/Makefile
src/lib/python/isc/util/Makefile
src/lib/python/isc/util/tests/Makefile
src/lib/python/isc/datasrc/Makefile
src/lib/python/isc/cc/Makefile
src/lib/python/isc/cc/tests/Makefile
......
......@@ -63,10 +63,10 @@ import pwd
import posix
import isc.cc
import isc.utils.process
import isc.util.process
# Assign this process some longer name
isc.utils.process.rename(sys.argv[0])
isc.util.process.rename(sys.argv[0])
# This is the version that gets displayed to the user.
# The VERSION string consists of the module name, the module version
......@@ -627,7 +627,7 @@ def check_addr(option, opt_str, value, parser):
def process_rename(option, opt_str, value, parser):
"""Function that renames the process if it is requested by a option."""
isc.utils.process.rename(value)
isc.util.process.rename(value)
def main():
global options
......
......@@ -24,9 +24,9 @@ from bindctl.moduleinfo import *
from bindctl.bindcmd import *
import pprint
from optparse import OptionParser, OptionValueError
import isc.utils.process
import isc.util.process
isc.utils.process.rename()
isc.util.process.rename()
__version__ = 'Bindctl'
......
......@@ -21,11 +21,11 @@ import sys; sys.path.append ('@@PYTHONPATH@@')
from isc.config.cfgmgr import ConfigManager, ConfigManagerDataReadError
from isc.cc import SessionError
import isc.utils.process
import isc.util.process
import signal
import os
isc.utils.process.rename()
isc.util.process.rename()
# If B10_FROM_SOURCE is set in the environment, we use data files
# from a directory relative to that, otherwise we use the ones
......
......@@ -42,7 +42,7 @@ import random
import time
import signal
from isc.config import ccsession
import isc.utils.process
import isc.util.process
from optparse import OptionParser, OptionValueError
from hashlib import sha1
try:
......@@ -50,7 +50,7 @@ try:
except ImportError:
import dummy_threading as threading
isc.utils.process.rename()
isc.util.process.rename()
__version__ = 'BIND10'
URL_PATTERN = re.compile('/([\w]+)(?:/([\w]+))?/?')
......
......@@ -18,12 +18,12 @@
import sys; sys.path.append ('@@PYTHONPATH@@')
import re, getopt
import isc.datasrc
import isc.utils.process
import isc.util.process
from isc.datasrc.master import MasterFile
import time
import os
isc.utils.process.rename()
isc.util.process.rename()
#########################################################################
# usage: print usage note and exit
......
......@@ -31,11 +31,11 @@ import select
import pprint
import random
from optparse import OptionParser, OptionValueError
import isc.utils.process
import isc.util.process
import isc.cc
isc.utils.process.rename()
isc.util.process.rename()
# This is the version that gets displayed to the user.
__version__ = "v20091030 (Paving the DNS Parking Lot)"
......
......@@ -17,7 +17,7 @@
import unittest
import os
import os.path
import isc.utils.process
import isc.util.process
import re
class TestRename(unittest.TestCase):
......@@ -28,7 +28,7 @@ class TestRename(unittest.TestCase):
data = ''.join(open(filename).readlines())
prettyname = 'src' + filename[filename.rfind('../') + 2:]
self.assertTrue(fun.search(data),
"Didn't find a call to isc.utils.process.rename in " + prettyname)
"Didn't find a call to isc.util.process.rename in " + prettyname)
def test_calls(self):
"""
......@@ -45,7 +45,7 @@ class TestRename(unittest.TestCase):
# Script name regular expression
scripts = re.compile(r'((\w|[-.0-9])+)')
# Line with the call
fun = re.compile(r'^\s*isc\.utils\.process\.rename\s*\(.*\)\s*(|#.*)$',
fun = re.compile(r'^\s*isc\.util\.process\.rename\s*\(.*\)\s*(|#.*)$',
re.MULTILINE)
# Find all Makefile and extract names of scripts
......
......@@ -25,9 +25,9 @@ import csv
import getpass
import getopt
import sys
import isc.utils.process
import isc.util.process
isc.utils.process.rename()
isc.util.process.rename()
VERSION_NUMBER = 'bind10'
DEFAULT_FILE = 'cmdctl-accounts.csv'
......
......@@ -29,7 +29,7 @@ import random
from optparse import OptionParser, OptionValueError
from isc.config.ccsession import *
from isc.notify import notify_out
import isc.utils.process
import isc.util.process
try:
from pydnspp import *
except ImportError as e:
......@@ -37,7 +37,7 @@ except ImportError as e:
# must keep running, so we warn about it and move forward.
sys.stderr.write('[b10-xfrin] failed to import DNS module: %s\n' % str(e))
isc.utils.process.rename()
isc.util.process.rename()
# If B10_FROM_BUILD is set in the environment, we use data files
# from a directory relative to that, otherwise we use the ones
......
......@@ -29,7 +29,7 @@ from isc.config.ccsession import *
from isc.log.log import *
from isc.cc import SessionError, SessionTimeout
from isc.notify import notify_out
import isc.utils.process
import isc.util.process
import socket
import select
import errno
......@@ -42,7 +42,7 @@ except ImportError as e:
# must keep running, so we warn about it and move forward.
sys.stderr.write('[b10-xfrout] failed to import DNS or XFR module: %s\n' % str(e))
isc.utils.process.rename()
isc.util.process.rename()
if "B10_FROM_BUILD" in os.environ:
SPECFILE_PATH = os.environ["B10_FROM_BUILD"] + "/src/bin/xfrout"
......
......@@ -36,9 +36,9 @@ import errno
from isc.datasrc import sqlite3_ds
from optparse import OptionParser, OptionValueError
from isc.config.ccsession import *
import isc.utils.process
import isc.util.process
isc.utils.process.rename()
isc.util.process.rename()
# If B10_FROM_BUILD is set in the environment, we use data files
# from a directory relative to that, otherwise we use the ones
......
SUBDIRS = datasrc cc config log notify utils # Util
SUBDIRS = datasrc cc config log notify util
python_PYTHON = __init__.py
......
python_PYTHON = __init__.py hexdump.py
pythondir = $(pyexecdir)/isc/Util
from isc.Util.hexdump import *
import sys
_FILTER=''.join([(len(repr(chr(x)))==3) and chr(x) or '.' for x in range(256)])
def hexdump(src, length=16):
result=[]
for i in range(0, len(src), length):
s = src[i:i+length]
hexa = ' '.join(["%02X" % x for x in s])
printable = s.decode().translate(_FILTER)
item = "%08X %-*s %s\n" % (i, length * 3, hexa, printable)
result.append(item[0:34] + ' ' + item[34:])
print(''.join(result))
......@@ -2,4 +2,4 @@ SUBDIRS = tests
python_PYTHON = __init__.py process.py
pythondir = $(pyexecdir)/isc/utils
pythondir = $(pyexecdir)/isc/util
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment