# HG changeset patch # User RĂ©mi Cardona # Date 1417777693 -3600 # Node ID 6fd167b140cd8e65227c8e132c3a7ed421b3d0c8 # Parent ff7f86d8393db5841ff1d91343d3a4d227f5d091 [server] Remove useless 'is None' checks 'pb' is never none since 3386fd89c914 when support for the 'APYCOT_ROOT' env var was removed. diff -r ff7f86d8393d -r 6fd167b140cd server/schemaserial.py --- a/server/schemaserial.py Wed Apr 02 15:32:17 2014 +0200 +++ b/server/schemaserial.py Fri Dec 05 12:08:13 2014 +0100 @@ -358,27 +358,23 @@ eschemas.insert(0, schema.eschema('CWEType')) for eschema in eschemas: execschemarql(execute, eschema, eschema2rql(eschema, groupmap)) - if pb is not None: - pb.update() + pb.update() # serialize constraint types cstrtypemap = {} rql = 'INSERT CWConstraintType X: X name %(ct)s' for cstrtype in CONSTRAINTS: cstrtypemap[cstrtype] = execute(rql, {'ct': unicode(cstrtype)}, build_descr=False)[0][0] - if pb is not None: - pb.update() + pb.update() # serialize relations for rschema in schema.relations(): # skip virtual relations such as eid, has_text and identity if rschema in VIRTUAL_RTYPES: - if pb is not None: - pb.update() + pb.update() continue if rschema.rule: execschemarql(execute, rschema, crschema2rql(rschema)) - if pb is not None: - pb.update() + pb.update() continue execschemarql(execute, rschema, rschema2rql(rschema, addrdef=False)) if rschema.symmetric: @@ -389,8 +385,7 @@ for rdef in rdefs: execschemarql(execute, rdef, rdef2rql(rdef, cstrtypemap, groupmap)) - if pb is not None: - pb.update() + pb.update() # serialize unique_together constraints for eschema in eschemas: if eschema._unique_together: @@ -398,8 +393,7 @@ # serialize yams inheritance relationships for rql, kwargs in specialize2rql(schema): execute(rql, kwargs, build_descr=False) - if pb is not None: - pb.update() + pb.update() print