Manual fixes after 2to3

This commit is contained in:
Shay Nehmad 2019-07-28 13:41:14 +03:00
parent abaaeea69a
commit 35674286cf
4 changed files with 2 additions and 9 deletions

View File

@ -21,7 +21,7 @@ class MongoUtils:
elif type(o) in (int, float, bool):
return o
elif type(o) in (str, str):
elif isinstance(o, str):
# mongo dosn't like unprintable chars, so we use repr :/
return repr(o)

View File

@ -14,11 +14,6 @@ from requests import ConnectionError
from common.network.network_range import CidrRange
try:
int # Python 2
except NameError:
long = int # Python 3
# Timeout for monkey connections
TIMEOUT = 15

View File

@ -1,5 +1,3 @@
# In python 2.7
import os
import os.path
import sys

View File

@ -95,7 +95,7 @@ class WMIHandler(object):
groups_entities_list = self.info_for_mongo[group_sid]['entities_list']
child_sid = ''
if type(child_part) in (str, str):
if isinstance(child_part, str):
child_part = str(child_part)
name = None
domain_name = None