Commit 4649ce6d authored by Federico Sismondi's avatar Federico Sismondi
Browse files

deleted six from dependencies, added import try in packet dump library

parent f2d6b5a6
import os
import six
import pika
import shutil
import signal
......@@ -8,6 +7,13 @@ from datetime import datetime
from utils.messages import *
from utils.pure_pcapy import Dumper, Pkthdr, DLT_RAW, DLT_IEEE802_15_4_NOFCS
# For Python 3.0 and later
from urllib.parse import urlparse
except ImportError:
# Fall back to Python 2
from urlparse import urlparse
logger = logging.getLogger(__name__)
......@@ -36,7 +42,7 @@ def launch_amqp_data_to_pcap_dumper(amqp_url=None, amqp_exchange=None, topics=No
amqp_url = str(os.environ['AMQP_URL'])
print('Imported AMQP_URL env var: %s' % amqp_url)
p = six.moves.urllib_parse.urlparse(amqp_url)
p = urlparse(amqp_url)
user = p.username
server = p.hostname
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment