comparison mercurial/util.py @ 2153:635653cd73ab

move SignalInterrupt class into util module.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Fri, 28 Apr 2006 14:50:23 -0700
parents 760339ccc799
children d821918e3bee
comparison
equal deleted inserted replaced
2151:0ce3cd330996 2153:635653cd73ab
13 import os, errno 13 import os, errno
14 from i18n import gettext as _ 14 from i18n import gettext as _
15 from demandload import * 15 from demandload import *
16 demandload(globals(), "cStringIO errno popen2 re shutil sys tempfile") 16 demandload(globals(), "cStringIO errno popen2 re shutil sys tempfile")
17 demandload(globals(), "threading time") 17 demandload(globals(), "threading time")
18
19 class SignalInterrupt(Exception):
20 """Exception raised on SIGTERM and SIGHUP."""
18 21
19 def pipefilter(s, cmd): 22 def pipefilter(s, cmd):
20 '''filter string S through command CMD, returning its output''' 23 '''filter string S through command CMD, returning its output'''
21 (pout, pin) = popen2.popen2(cmd, -1, 'b') 24 (pout, pin) = popen2.popen2(cmd, -1, 'b')
22 def writer(): 25 def writer():