forked from p34709852/monkey
Manual fixes after 2to3
This commit is contained in:
parent
abaaeea69a
commit
35674286cf
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# In python 2.7
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue