Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sonic_eeprom/eeprom_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
from __future__ import print_function

try:
import exceptions
import exceptions # Python 2
except ImportError:
import builtins as exceptions # Python 3
try:
import binascii
import optparse
import os
Expand Down
5 changes: 4 additions & 1 deletion sonic_eeprom/eeprom_dts.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/usr/bin/python
# Copyright 2012 Cumulus Networks LLC, all rights reserved

try:
import exceptions # Python 2
except ImportError:
import builtins as exceptions # Python 3
try:
import os
import exceptions
import binascii
import subprocess
except ImportError as e:
Expand Down
7 changes: 5 additions & 2 deletions sonic_eeprom/eeprom_tlvinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@
from __future__ import print_function

try:
import exceptions
import exceptions # Python 2
except ImportError:
import builtins as exceptions # Python 3
try:
import binascii
import optparse
import os
import sys
import eeprom_base
import redis
from . import eeprom_base # Dot module supports both Python 2 and Python 3 using explicit relative import methods
except ImportError as e:
raise ImportError (str(e) + "- required module not found")

Expand Down
2 changes: 1 addition & 1 deletion sonic_sfp/sff8436.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import types
from math import log10
from sff8024 import type_of_transceiver
from sffbase import sffbase
from .sffbase import sffbase # Dot module supports both Python 2 and Python 3 using explicit relative import methods
except ImportError as e:
raise ImportError (str(e) + "- required module not found")

Expand Down
2 changes: 1 addition & 1 deletion sonic_sfp/sff8472.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import types
from math import log10
from sff8024 import type_of_transceiver
from sffbase import sffbase
from .sffbase import sffbase # Dot module supports both Python 2 and Python 3 using explicit relative import methods
except ImportError as e:
raise ImportError (str(e) + "- required module not found")

Expand Down
10 changes: 5 additions & 5 deletions sonic_sfp/sfputilbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
import binascii
import os
import re
import bcmshell
from . import bcmshell # Dot module supports both Python 2 and Python 3 using explicit relative import methods
from sonic_eeprom import eeprom_dts
from sff8472 import sff8472InterfaceId
from sff8472 import sff8472Dom
from sff8436 import sff8436InterfaceId
from sff8436 import sff8436Dom
from .sff8472 import sff8472InterfaceId # Dot module supports both Python 2 and Python 3 using explicit relative import methods
from .sff8472 import sff8472Dom # Dot module supports both Python 2 and Python 3 using explicit relative import methods
from .sff8436 import sff8436InterfaceId # Dot module supports both Python 2 and Python 3 using explicit relative import methods
from .sff8436 import sff8436Dom # Dot module supports both Python 2 and Python 3 using explicit relative import methods
from inf8628 import inf8628InterfaceId
except ImportError as e:
raise ImportError("%s - required module not found" % str(e))
Expand Down