Changeset 720

Show
Ignore:
Timestamp:
07/23/10 04:46:44 (2 months ago)
Author:
tal
Message:
Clarified some condition enforcement code.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • packages/woffTools/trunk/Lib/woffTools/__init__.py

    r719 r720  
    158158        if "GlyphOrder" in tags: 
    159159            tags.remove("GlyphOrder") 
    160         if "DSIG" in tags and self._tableOrder is None or (set(self._tableOrder) != set(tags)): 
    161             raise WOFFLibError("A complete table order must be supplied when saving a font with a 'DSIG' table.") 
    162         if "DSIG" in tags and reorderTables: 
    163             raise WOFFLibError("Tables can not be reordered when a 'DSIG' table is in the font. Set reorderTables to False.") 
    164         if "DSIG" in tags and recalculateHeadChecksum: 
    165             raise WOFFLibError("The 'head' table checkSumAdjustment can not be recalculated when a 'DSIG' table is in the font.") 
     160        if "DSIG" in tags: 
     161            if self._tableOrder is None or (set(self._tableOrder) != set(tags)): 
     162                raise WOFFLibError("A complete table order must be supplied when saving a font with a 'DSIG' table.") 
     163            elif reorderTables: 
     164                raise WOFFLibError("Tables can not be reordered when a 'DSIG' table is in the font. Set reorderTables to False.") 
     165            elif recalculateHeadChecksum: 
     166                raise WOFFLibError("The 'head' table checkSumAdjustment can not be recalculated when a 'DSIG' table is in the font.") 
    166167        # sort the tags if necessary 
    167168        if reorderTables: