sharing: flake8 fixes
This commit is contained in:
@@ -283,7 +283,7 @@ class BaseSharing:
|
|||||||
if fieldname not in DB_TYPES_V1:
|
if fieldname not in DB_TYPES_V1:
|
||||||
logger.error("sharing database row error, unsupported fieldname found: %r", fieldname)
|
logger.error("sharing database row error, unsupported fieldname found: %r", fieldname)
|
||||||
return False
|
return False
|
||||||
if type(entry[fieldname]) != DB_TYPES_V1[fieldname]:
|
if type(entry[fieldname]) is not DB_TYPES_V1[fieldname]:
|
||||||
logger.error("sharing database entry type error fieldname=%r is %r should %r entry=%r", fieldname, type(fieldname), DB_TYPES_V1[fieldname], entry)
|
logger.error("sharing database entry type error fieldname=%r is %r should %r entry=%r", fieldname, type(fieldname), DB_TYPES_V1[fieldname], entry)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -302,8 +302,9 @@ class BaseSharing:
|
|||||||
|
|
||||||
# permissions
|
# permissions
|
||||||
try:
|
try:
|
||||||
permissions = config.rights_permission(entry['Permissions'])
|
# test
|
||||||
except ValueError as e:
|
config.rights_permission(entry['Permissions'])
|
||||||
|
except ValueError:
|
||||||
logger.error("Permissions contain invalid entry: %r", entry['Permissions'])
|
logger.error("Permissions contain invalid entry: %r", entry['Permissions'])
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user