From 5eb5ab2f287f5276898abff99fcb97603bbfa4e3 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 19 Mar 2011 15:25:36 -0400 Subject: [PATCH] misc updates --- clint/misc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clint/misc.py b/clint/misc.py index 82561f9..8a12b49 100644 --- a/clint/misc.py +++ b/clint/misc.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +import sys + class Borg(object): """All instances of Borg have the same value.""" @@ -29,12 +31,10 @@ def progressbar(it, prefix='', size=32, hide=False): def is_collection(obj): """Tests if an object is a collection""" - val = hasattr(obj, '__getitem__') - if isinstance(obj, basestring): return False - return val + return hasattr(obj, '__getitem__') def fixedwidth(string, width=15): """Adds column to output steam."""