Skip to content

Commit 98d8ddd

Browse files
author
Robert Damas
committed
More Py2Py3 compatibility
1 parent 511620a commit 98d8ddd

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/Discover.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33

44
from __future__ import print_function
55

6-
from . import Helper
6+
try:
7+
from . import Helper
8+
except:
9+
import Helper
10+
711
import re
812
import sys
913

src/Helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Helper functions to capsule Python2/Python3 differences
2+
# Depends: smartctl
33

44
import json
55
import subprocess

src/SmartInfo.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33

44
from __future__ import print_function
55

6-
from . import Helper
6+
try:
7+
from . import Helper
8+
except:
9+
import Helper
710

811
import os
912
import stat

0 commit comments

Comments
 (0)