equal
deleted
inserted
replaced
26 import sys |
26 import sys |
27 import os |
27 import os |
28 from contextlib import contextmanager |
28 from contextlib import contextmanager |
29 import logging |
29 import logging |
30 import subprocess |
30 import subprocess |
|
31 |
|
32 from six import string_types |
31 |
33 |
32 from logilab.common import nullobject |
34 from logilab.common import nullobject |
33 from logilab.common.configuration import Configuration, merge_options |
35 from logilab.common.configuration import Configuration, merge_options |
34 from logilab.common.shellutils import ASK, generate_password |
36 from logilab.common.shellutils import ASK, generate_password |
35 |
37 |
1018 defaulteperms = (PUB_SYSTEM_ENTITY_PERMS,) |
1020 defaulteperms = (PUB_SYSTEM_ENTITY_PERMS,) |
1019 # canonicalize vs str/unicode |
1021 # canonicalize vs str/unicode |
1020 for p in ('read', 'add', 'update', 'delete'): |
1022 for p in ('read', 'add', 'update', 'delete'): |
1021 rule = perms.get(p) |
1023 rule = perms.get(p) |
1022 if rule: |
1024 if rule: |
1023 perms[p] = tuple(str(x) if isinstance(x, basestring) else x |
1025 perms[p] = tuple(str(x) if isinstance(x, string_types) else x |
1024 for x in rule) |
1026 for x in rule) |
1025 return perms, perms in defaultrelperms or perms in defaulteperms |
1027 return perms, perms in defaultrelperms or perms in defaulteperms |
1026 |
1028 |
1027 |
1029 |
1028 class SchemaDiffCommand(Command): |
1030 class SchemaDiffCommand(Command): |