1
# createmeter.py - Copyright (C) 2009 Red Hat, Inc.
2
# Written by Darryl L. Pierce <dpierce@redhat.com>
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; version 2 of the License.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16
# MA 02110-1301, USA. A copy of the GNU General Public License is
17
# also available at http://www.gnu.org/copyleft/gpl.html.
19
import urlgrabber.progress as progress
22
class CreateMeter(progress.BaseMeter):
23
def _do_start(self, now = None):
24
logging.info("Starting...")
26
def _do_end(self, amount_read, now = None):
27
logging.info("Ending: read=%d" % amount_read)
29
def _do_update(self, amount_read, now = None):
30
logging.info("Update: read=%d" % amount_read)