server/serverctl.py
changeset 10612 84468b90e9c1
parent 10589 7c23b7de2b8d
child 10662 10942ed172de
--- a/server/serverctl.py	Wed Sep 16 11:23:51 2015 +0200
+++ b/server/serverctl.py	Mon Sep 14 16:03:07 2015 +0200
@@ -29,6 +29,8 @@
 import logging
 import subprocess
 
+from six import string_types
+
 from logilab.common import nullobject
 from logilab.common.configuration import Configuration, merge_options
 from logilab.common.shellutils import ASK, generate_password
@@ -1020,7 +1022,7 @@
     for p in ('read', 'add', 'update', 'delete'):
         rule = perms.get(p)
         if rule:
-            perms[p] = tuple(str(x) if isinstance(x, basestring) else x
+            perms[p] = tuple(str(x) if isinstance(x, string_types) else x
                              for x in rule)
     return perms, perms in defaultrelperms or perms in defaulteperms