Changeset - cd2103a83487
[Not reviewed]
default
0 1 0
timeless@gmail.com - 10 years ago 2016-05-03 14:15:59
timeless@gmail.com
spelling: succeeded
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/dbmigrate/migrate/versioning/util/__init__.py
Show inline comments
 
@@ -46,25 +46,25 @@ def asbool(obj):
 
        elif obj in ['false', 'no', 'off', 'n', 'f', '0']:
 
            return False
 
        else:
 
            raise ValueError("String is not true/false: %r" % obj)
 
    if obj in (True, False):
 
        return bool(obj)
 
    else:
 
        raise ValueError("String is not true/false: %r" % obj)
 

	
 
def guess_obj_type(obj):
 
    """Do everything to guess object type from string
 

	
 
    Tries to convert to `int`, `bool` and finally returns if not succeded.
 
    Tries to convert to `int`, `bool` and finally returns if not succeeded.
 

	
 
    .. versionadded: 0.5.4
 
    """
 

	
 
    result = None
 

	
 
    try:
 
        result = int(obj)
 
    except:
 
        pass
 

	
 
    if result is None:
0 comments (0 inline, 0 general)