Project

General

Profile

« Previous | Next » 

Revision 5700

units.py: MissingUnitsException: Fixed bug where quantity is a Quantity object, not a string, and thus needs to be converted to a string using strings.ustr()

View differences:

units.py
9 9

  
10 10
class MissingUnitsException(Exception):
11 11
    def __init__(self, quantity):
12
        Exception.__init__(self, 'Quantity has no units: '+quantity)
12
        Exception.__init__(self, 'Quantity has no units: '
13
            +strings.ustr(quantity))
13 14

  
14 15
def std_units(units):
15 16
    if units == None: return units

Also available in: Unified diff